MCPcopy
hub / github.com/pallets/flask / PathAwareSessionInterface

Class PathAwareSessionInterface

tests/test_reqctx.py:232–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230 # This session interface will use a cookie with a different name if the
231 # requested url ends with the string "dynamic_cookie"
232 class PathAwareSessionInterface(SecureCookieSessionInterface):
233 def get_cookie_name(self, app):
234 if flask.request.url.endswith("dynamic_cookie"):
235 return "dynamic_cookie_name"
236 else:
237 return super().get_cookie_name(app)
238
239 class CustomFlask(flask.Flask):
240 session_interface = PathAwareSessionInterface()

Callers 1

CustomFlaskClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected