Skip to content

Commit 6fd2a4a

Browse files
committed
Added Root path to flask request config. This fixes issues with flask applications running not as the root for a domain.
1 parent 52d2ac8 commit 6fd2a4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demo-flask/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def prepare_flask_request(request):
2121
return {
2222
"https": "on" if request.scheme == "https" else "off",
2323
"http_host": request.host,
24-
"script_name": request.path,
24+
"script_name": request.root_path + request.path,
2525
"get_data": request.args.copy(),
2626
# Uncomment if using ADFS as IdP, https://github.com/onelogin/python-saml/pull/144
2727
# 'lowercase_urlencoding': True,

0 commit comments

Comments
 (0)