设置跨域

This commit is contained in:
cxykevin 2024-09-16 17:47:49 +08:00
parent 3bd99994db
commit 0c17e99f53
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ async def login(apikey: str, resp: Response):
return {"msg": obj["msg"]}
username = obj["data"]["username"]
tkn = await create_token(username)
resp.set_cookie("session", tkn)
resp.set_cookie("session", tkn, secure=True, samesite="None")
return {}