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

Method get_cookie_samesite

src/flask/sessions.py:208–213  ·  view source on GitHub ↗

Return ``'Strict'`` or ``'Lax'`` if the cookie should use the ``SameSite`` attribute. This currently just returns the value of the :data:`SESSION_COOKIE_SAMESITE` setting.

(self, app: Flask)

Source from the content-addressed store, hash-verified

206 return app.config["SESSION_COOKIE_SECURE"] # type: ignore[no-any-return]
207
208 def get_cookie_samesite(self, app: Flask) -> str | None:
209 """Return ``'Strict'`` or ``'Lax'`` if the cookie should use the
210 ``SameSite`` attribute. This currently just returns the value of
211 the :data:`SESSION_COOKIE_SAMESITE` setting.
212 """
213 return app.config["SESSION_COOKIE_SAMESITE"] # type: ignore[no-any-return]
214
215 def get_cookie_partitioned(self, app: Flask) -> bool:
216 """Returns True if the cookie should be partitioned. By default, uses

Callers 1

save_sessionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected