File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 10
10
from qwc_services_core .runtime_config import RuntimeConfig
11
11
from qwc2_viewer import QWC2Viewer
12
12
13
- # Autologin config
14
- AUTH_PATH = os .environ .get (
15
- 'AUTH_SERVICE_URL' ,
16
- # For backward compatiblity
17
- os .environ .get ('AUTH_PATH' , '/auth/' ))
18
-
19
13
# Flask application
20
14
app = Flask (__name__ )
21
15
# disable verbose 404 error message
@@ -52,7 +46,11 @@ def with_no_cache_headers(response):
52
46
53
47
54
48
def auth_path_prefix ():
55
- return app .session_interface .tenant_path_prefix ().rstrip ("/" ) + "/" + AUTH_PATH .lstrip ("/" )
49
+ tenant = tenant_handler .tenant ()
50
+ config_handler = RuntimeConfig ("mapViewer" , app .logger )
51
+ config = config_handler .tenant_config (tenant )
52
+ auth_path = config .get ('auth_service_url' , '/auth/' )
53
+ return app .session_interface .tenant_path_prefix ().rstrip ("/" ) + "/" + auth_path .lstrip ("/" )
56
54
57
55
58
56
@app .before_request
You can’t perform that action at this time.
0 commit comments