diff --git a/models/db.py b/models/db.py index 7bb1826af..4c2554a99 100644 --- a/models/db.py +++ b/models/db.py @@ -687,3 +687,8 @@ def _create_access_token(data: dict, expires=None, scopes=None) -> bytes: # decode here decodes the byte str to a normal str not the token return encoded_jwt + + +# This **may** be a workaround for the bad urls in email resets +if os.environ.get("LOAD_BALANCER_HOST", "") == "runestone.academy": + request.env.wsgi_url_scheme = "https"