Skip to content

Commit

Permalink
2024年11月13日 关闭根域cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
ss1917 committed Nov 19, 2024
1 parent 27d8bd0 commit 400ba0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN yum install -y python3 python3-pip git && \

# 升级 pip 并安装 codo_sdk
RUN python3 -m pip install --upgrade pip && \
pip install -U git+https://github.com/ss1917/codo_sdk.git
pip install -U git+https://github.com/ss1917/ops_sdk.git

# 设置环境变量
ARG SERVICE_NAME
Expand All @@ -30,4 +30,4 @@ RUN pip install -r docs/requirements.txt &> /dev/null && \
EXPOSE 8000
CMD /data/run-py.sh ${SERVICE_NAME}

### docker build --no-cache --build-arg SERVICE_NAME=admin-mg-api . -t codo-admin-image
### docker build --no-cache --build-arg SERVICE_NAME=mg . -t codo-admin-image
12 changes: 6 additions & 6 deletions mg/handlers/login_v5_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ async def post(self, *args, **kwargs):
# logging.info(f"设置主域Cookie {root_domain}")
# except Exception as err:
# logging.error(f"设置主域cookie失败 {err}")
#
#TODO 清理外层数据
real_login_dict = dict(code=0, msg='登录成功',
# username=user_info.username,
# nickname=user_info.nickname,
# auth_key=auth_key,
# avatar=user_info.avatar,
# c_url=c_url,
username=user_info.username,
nickname=user_info.nickname,
auth_key=auth_key,
avatar=user_info.avatar,
c_url=c_url,
data=dict(username=user_info.username, nickname=user_info.nickname, auth_key=auth_key,
avatar=user_info.avatar, c_url=c_url))
return self.write(real_login_dict)
Expand Down
7 changes: 2 additions & 5 deletions startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ def __init__(self, service='api', progressid=''):
fire.Fire(MyProgram)

"""
python3 startup.py --service=api --port=8010
python3 startup.py --service=sub_log
python3 startup.py --service=gw_log
python3 startup.py --service=mg --port=8010
python3 startup.py --service=init
docker build --no-cache --build-arg SERVICE_NAME=admin-mg-api . -t ops_mg_image
docker build --build-arg SERVICE_NAME=gw_log . -t ops_mg_log_image
docker build --no-cache --build-arg SERVICE_NAME=mg . -t codo-admin-image
"""

0 comments on commit 400ba0c

Please sign in to comment.