v1.7.0 hotfix (#591)

feat(api): check forwarded SSO path
This commit is contained in:
Kraiem Taha Yassine 2022-07-11 11:55:51 +02:00 committed by GitHub
parent 6fe8d79306
commit 7055fb9a42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,12 +97,14 @@ async def prepare_request(request: Request):
# add / to /acs
if not path.endswith("/"):
path = path + '/'
if not path.startswith("/api"):
path = "/api" + path
return {
'https': 'on' if proto == 'https' else 'off',
'http_host': request.headers['host'],
'server_port': url_data.port,
'script_name': "/api" + path,
'script_name': path,
'get_data': request.args.copy(),
# Uncomment if using ADFS as IdP, https://github.com/onelogin/python-saml/pull/144
# 'lowercase_urlencoding': True,