Commit graph

8 commits

Author SHA1 Message Date
7cbbbc0a3a Implement CMSMultiSiteMiddleware in the repo instead of the unmaintained fork 2026-10-06 10:32:20 +03:00
8e5761e62a Move settings and middleware to Django 1.11 style
Use MIDDLEWARE with adapted old-style middleware, the template context
processors, explicit bootstrap3 URLs, the captcha app name, and drop the
obsolete migration module overrides and removed apps.
2026-10-06 01:10:06 +03:00
748000afd9 Avoid nested hostnames when /dev-sites/ is opened on a site address 2026-09-30 16:03:37 +03:00
4379e9fb89 Disable caching and report the chosen site in dev responses
Adds Cache-Control: no-store and an X-Dev-Site header to the dev site
switcher so a browser cannot reuse another site's page or redirect, and
the selected site is visible in dev tools.
2026-09-30 15:52:54 +03:00
63c17a6cdf Choose the dev site from the hostname so tabs stay independent
The cookie is shared by all tabs and redirects dropped ?site=, so opening
several sites made them all show the last one. The site is now taken from
<domain>.<anything> hosts (each site its own origin), with ?site= and the
cookie as fallback, and redirects keep ?site=. /dev-sites/ links use the
per-site hostnames, via sslip.io when accessed by IP.
2026-09-30 15:44:43 +03:00
d4d3884d7c Add dev site switcher for testing every site from one host
With DEBUG on, ?site=<domain> selects the site without DNS or hosts
entries and is remembered in a cookie. /dev-sites/ lists all
configured sites as links.
2026-09-30 14:54:38 +03:00
M.Ravi
f419ce784f Fixed some flake8 warnings 2017-07-03 23:53:37 +02:00
Andrii Marynets
9431e9846c Add middleware for fix "get_host() method fails when the host is behind multiple proxies" 2017-06-30 08:44:39 +03:00