diff options
author | 2021-03-07 00:55:31 +0300 | |
---|---|---|
committer | 2021-03-07 00:55:31 +0300 | |
commit | 8ef22e9bac402f12bb5f6e932ff67fd45b26433b (patch) | |
tree | 8a7ab3c366cb5909b81cddbd8337cf15aa91cdd9 /backend/routes/forms/submit.py | |
parent | Corrects Domain On Token Cookie (diff) |
Switches Forwarded Protocol Header
Traefik forwards https traffic to http, which causes issues with the
protocol in a request's URL. This switch uses the protocol header to
correctly set the protocol.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'backend/routes/forms/submit.py')
-rw-r--r-- | backend/routes/forms/submit.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/backend/routes/forms/submit.py b/backend/routes/forms/submit.py index ae98cfb..2624c98 100644 --- a/backend/routes/forms/submit.py +++ b/backend/routes/forms/submit.py @@ -75,11 +75,8 @@ class SubmitForm(Route): except ValueError: expiry = None - origin = request.headers.get("origin") expiry_seconds = (expiry - datetime.datetime.now()).seconds - await set_response_token( - response, origin, request.url, request.user.token, expiry_seconds - ) + await set_response_token(response, request, request.user.token, expiry_seconds) except httpx.HTTPStatusError: pass |