Trailing slash in ssowat uris cause issues to access app installed on root, we only need it for app_map ...

This commit is contained in:
Alexandre Aubin 2020-04-28 18:55:39 +02:00
parent d91966ca98
commit 3582a5a389

View file

@ -455,6 +455,8 @@ def app_map(app=None, raw=False, user=None):
perm_domain, perm_path = perm_url.split("/", 1)
perm_path = "/" + perm_path.rstrip("/")
# N.B. : having '/' instead of empty string is needed in app_map
# but should *not* be done in app_ssowatconf (yeah :[)
perm_path = perm_path if perm_path.strip() != "" else "/"
return perm_domain, perm_path
@ -1638,8 +1640,6 @@ def app_ssowatconf():
perm_domain, perm_path = perm_url.split("/", 1)
perm_path = "/" + perm_path.rstrip("/")
perm_path = perm_path if perm_path.strip() != "" else "/"
return perm_domain + perm_path
# Skipped