diff options
| author | Bobby <[email protected]> | 2022-10-10 11:58:49 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-10-10 11:58:49 -0400 |
| commit | 69cba5af4a819ef732e3bbb7918bacf3c020808f (patch) | |
| tree | 7395ea0176888fce5f8eeb75110583df0e13bbee /middleware | |
| parent | a3a566c83ba7ac8af82acf0955fe791811792501 (diff) | |
| download | thatcomputerscientist-69cba5af4a819ef732e3bbb7918bacf3c020808f.tar.xz thatcomputerscientist-69cba5af4a819ef732e3bbb7918bacf3c020808f.zip | |
Moving login and logout functions to subdomains
Diffstat (limited to 'middleware')
| -rw-r--r-- | middleware/subdomainmiddleware.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/middleware/subdomainmiddleware.py b/middleware/subdomainmiddleware.py index 479c74d6..b2f39711 100644 --- a/middleware/subdomainmiddleware.py +++ b/middleware/subdomainmiddleware.py @@ -24,6 +24,9 @@ class SubdomainURLRouting: configured_subdomains = getattr(settings, 'CONFIGURED_SUBDOMAINS', {}) if request.subdomain: if request.subdomain in configured_subdomains: + if request.META.get('HTTP_REFERER') is None: + request.META['HTTP_REFERER'] = 'https://{}{}'.format(request.subdomain, settings.HOSTS[0]) + request.urlconf = configured_subdomains[request.subdomain] + '.urls' else: if '*' in configured_subdomains: |
