aboutsummaryrefslogtreecommitdiffstats
path: root/backend/routes/auth/authorize.py
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-03-07 00:41:53 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-03-07 00:41:53 +0300
commit311a58b9a998385961a369dfbdc895c915ba28df (patch)
tree7f0292842f8216a812fef84f5a5d838472614380 /backend/routes/auth/authorize.py
parentFixes Domain URL On Token Cookie (diff)
Corrects Domain On Token Cookie
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'backend/routes/auth/authorize.py')
-rw-r--r--backend/routes/auth/authorize.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/routes/auth/authorize.py b/backend/routes/auth/authorize.py
index 5742b9b..ce7b8bd 100644
--- a/backend/routes/auth/authorize.py
+++ b/backend/routes/auth/authorize.py
@@ -77,8 +77,9 @@ async def set_response_token(
expiry: int
) -> None:
"""Helper that handles logic for updating a token in a set-cookie response."""
+ stripped_domain = request_url.scheme + request_url.netloc
if origin_url == constants.PRODUCTION_URL:
- domain = request_url
+ domain = stripped_domain
samesite = "strict"
elif not constants.PRODUCTION:
@@ -86,7 +87,7 @@ async def set_response_token(
samesite = "strict"
else:
- domain = request_url
+ domain = stripped_domain
samesite = "None"
response.set_cookie(