mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-29 15:50:05 -05:00
1 parent
2b00480605
commit
12f7141ad7
1 file changed
+8
-4
@@ -838,8 +838,12 @@ def get_safe_post_login_redirect():
|
||||
allow_list = [
|
||||
url_for('browser.index')
|
||||
]
|
||||
url = get_post_login_redirect()
|
||||
if url in allow_list:
|
||||
return url
|
||||
if "SCRIPT_NAME" in os.environ and os.environ["SCRIPT_NAME"]:
|
||||
allow_list.append(os.environ["SCRIPT_NAME"])
|
||||
|
||||
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