mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
committed by
Akshay Joshi
parent
2b00480605
commit
4d9dfe7d04
@@ -838,8 +838,12 @@ def get_safe_post_login_redirect():
|
|||||||
allow_list = [
|
allow_list = [
|
||||||
url_for('browser.index')
|
url_for('browser.index')
|
||||||
]
|
]
|
||||||
url = get_post_login_redirect()
|
if "SCRIPT_NAME" in os.environ and os.environ["SCRIPT_NAME"]:
|
||||||
if url in allow_list:
|
allow_list.append(os.environ["SCRIPT_NAME"])
|
||||||
return url
|
|
||||||
|
|
||||||
return "/"
|
url = get_post_login_redirect()
|
||||||
|
for item in allow_list:
|
||||||
|
if url.startswith(item):
|
||||||
|
return url
|
||||||
|
|
||||||
|
return os.environ.get("SCRIPT_NAME", "/")
|
||||||
|
|||||||
Reference in New Issue
Block a user