Skip to content

Commit

Permalink
Read OVERRIDE_ACCESS_COOKIE_PATH Env-Var to override access cookie path
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Oct 3, 2024
1 parent 0f08ba9 commit b11a75f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qwc_services_core/tenant_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ def tenant_path_prefix(self):

def get_cookie_path(self, app):
# https://flask.palletsprojects.com/en/1.1.x/api/#flask.sessions.SessionInterface.get_cookie_path
prefix = self.tenant_path_prefix()
if os.environ.get("OVERRIDE_ACCESS_COOKIE_PATH", None):
prefix = os.environ.get("OVERRIDE_ACCESS_COOKIE_PATH")
else:
prefix = self.tenant_path_prefix()
# Set config as a side effect
app.config['JWT_ACCESS_COOKIE_PATH'] = prefix
return prefix

0 comments on commit b11a75f

Please sign in to comment.