archivebox.core.middleware
Module Contents
Classes
Functions
Resolve the parent domain to scope the cross-subdomain login hint. |
|
Data
API
- archivebox.core.middleware._admin_login_hint_cookie_domain(config) str | None[source]
Resolve the parent domain to scope the cross-subdomain login hint.
NOTE: this cookie carries only the single bit “user is logged in on admin somewhere”; it MUST NOT be confused with the session cookie, which stays admin-host-scoped (see core/settings.py SESSION_COOKIE_DOMAIN comment — admin/public is a security boundary).
Returns the hostname portion of
get_base_host(which respectsBASE_URLand falls back to the local-bind mapping). Strips the port — cookieDomain=attributes don’t include ports. ReturnsNonewhen subdomain routing is off, the base host is empty, or the base host is an IP / barelocalhost(browsers reject cross-host cookies for those).