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

Method get_cookie_domain

src/flask/sessions.py:175–185  ·  view source on GitHub ↗

The value of the ``Domain`` parameter on the session cookie. If not set, browsers will only send the cookie to the exact domain it was set from. Otherwise, they will send it to any subdomain of the given value as well. Uses the :data:`SESSION_COOKIE_DOMAIN` config.

(self, app: Flask)

Source from the content-addressed store, hash-verified

173 return app.config["SESSION_COOKIE_NAME"] # type: ignore[no-any-return]
174
175 def get_cookie_domain(self, app: Flask) -> str | None:
176 """The value of the ``Domain`` parameter on the session cookie. If not set,
177 browsers will only send the cookie to the exact domain it was set from.
178 Otherwise, they will send it to any subdomain of the given value as well.
179
180 Uses the :data:`SESSION_COOKIE_DOMAIN` config.
181
182 .. versionchanged:: 2.3
183 Not set by default, does not fall back to ``SERVER_NAME``.
184 """
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

Callers 1

save_sessionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected