From c5aa07852162f02d390f8dd9dafb5cd8fc87a84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20B=C3=B6ttcher?= <c.boettcher@fz-juelich.de> Date: Mon, 24 Jul 2023 08:39:21 +0200 Subject: [PATCH] relative redirects for sso --- apiserver/main.py | 2 +- frontend/templates/login_content.html.jinja | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/main.py b/apiserver/main.py index 11a7de2..ab66cb0 100644 --- a/apiserver/main.py +++ b/apiserver/main.py @@ -151,7 +151,7 @@ async def sso_token(request: Request): log.debug("Externally authenticed User: '%s' requested /sso_token", datacat_user.username) # set token in cookie, this can then be extractet via the frontend javascript - response = RedirectResponse("/login.html?external_auth=True") + response = RedirectResponse("./login.html?external_auth=True") response.set_cookie( key="datacat_auth_token", value=access_token, secure=True, expires=datetime.utcnow()+timedelta(minutes=5) ) diff --git a/frontend/templates/login_content.html.jinja b/frontend/templates/login_content.html.jinja index 29a861c..f2e6559 100644 --- a/frontend/templates/login_content.html.jinja +++ b/frontend/templates/login_content.html.jinja @@ -30,7 +30,7 @@ </form> <!-- SSO Redirect --> - <a class="button btn btn-primary" href="/sso_login" id="ssoButton"> + <a class="button btn btn-primary" href="./sso_login" id="ssoButton"> Log In with SSO </a> -- GitLab