diff options
| author | 2021-03-07 00:41:53 +0300 | |
|---|---|---|
| committer | 2021-03-07 00:41:53 +0300 | |
| commit | 311a58b9a998385961a369dfbdc895c915ba28df (patch) | |
| tree | 7f0292842f8216a812fef84f5a5d838472614380 /backend | |
| parent | Fixes Domain URL On Token Cookie (diff) | |
Corrects Domain On Token Cookie
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to '')
| -rw-r--r-- | backend/routes/auth/authorize.py | 5 | 
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( | 
