diff options
| author | 2021-03-07 00:44:19 +0300 | |
|---|---|---|
| committer | 2021-03-07 00:44:19 +0300 | |
| commit | 85396769cc8481d1484da369f9c1a2e0c59409f7 (patch) | |
| tree | a2108b6b1ec75e5e791fa61382b68d44de17770a /backend | |
| parent | Corrects Domain On Token Cookie (diff) | |
Corrects Domain On Token Cookie
Correctly formats the domain set on the cookie used for tokens.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/routes/auth/authorize.py | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/backend/routes/auth/authorize.py b/backend/routes/auth/authorize.py index ce7b8bd..6a27c65 100644 --- a/backend/routes/auth/authorize.py +++ b/backend/routes/auth/authorize.py @@ -77,7 +77,8 @@ 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 +    stripped_domain = f"{request_url.scheme}://{request_url.netloc}/" +      if origin_url == constants.PRODUCTION_URL:          domain = stripped_domain          samesite = "strict" | 
