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

Method get_cookie_path

src/flask/sessions.py:187–193  ·  view source on GitHub ↗

Returns the path for which the cookie should be valid. The default implementation uses the value from the ``SESSION_COOKIE_PATH`` config var if it's set, and falls back to ``APPLICATION_ROOT`` or uses ``/`` if it's ``None``.

(self, app: Flask)

Source from the content-addressed store, hash-verified

185 return app.config["SESSION_COOKIE_DOMAIN"] # type: ignore[no-any-return]
186
187 def get_cookie_path(self, app: Flask) -> str:
188 """Returns the path for which the cookie should be valid. The
189 default implementation uses the value from the ``SESSION_COOKIE_PATH``
190 config var if it's set, and falls back to ``APPLICATION_ROOT`` or
191 uses ``/`` if it's ``None``.
192 """
193 return app.config["SESSION_COOKIE_PATH"] or app.config["APPLICATION_ROOT"] # type: ignore[no-any-return]
194
195 def get_cookie_httponly(self, app: Flask) -> bool:
196 """Returns True if the session cookie should be httponly. This

Callers 1

save_sessionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected