Skip to content

Commit 5ab9cd9

Browse files
committed
Don't pass os.environ to TenantSessionInterface
1 parent d80c8ad commit 5ab9cd9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/server.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ def mail_config_from_env(app):
7373
mail = Mail(app)
7474

7575
tenant_handler = TenantHandler(app.logger)
76+
app.wsgi_app = TenantPrefixMiddleware(app.wsgi_app)
77+
app.session_interface = TenantSessionInterface()
78+
7679
db_engine = DatabaseEngine()
7780

7881

@@ -109,10 +112,6 @@ def handler():
109112
return handler
110113

111114

112-
app.wsgi_app = TenantPrefixMiddleware(app.wsgi_app)
113-
app.session_interface = TenantSessionInterface(os.environ)
114-
115-
116115
def auth_path_prefix():
117116
# e.g. /admin/org1/auth
118117
return app.session_interface.tenant_path_prefix().rstrip("/") + "/" + AUTH_PATH.lstrip("/")

0 commit comments

Comments
 (0)