From 6bece398c8d86beeee6b7852f5889cad6eb55480 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Tue, 23 Jul 2024 17:06:25 -0500 Subject: [PATCH] fix: TUP-706 A.1.a. cannot login to site 2 --- taccsite_cms/middleware/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/taccsite_cms/middleware/settings.py b/taccsite_cms/middleware/settings.py index f96761211..04a2964af 100644 --- a/taccsite_cms/middleware/settings.py +++ b/taccsite_cms/middleware/settings.py @@ -14,7 +14,11 @@ def __call__(self, request): current_site = Site.objects.get(id=settings.DEFAULT_SITE_ID) request.current_site = current_site + current_domain = urlparse('//' + current_site.domain) + settings.SITE_ID = current_site.id + settings.SESSION_COOKIE_NAME = f"sessionid_site{current_site.id}" + settings.SESSION_COOKIE_DOMAIN = current_domain.hostname response = self.get_response(request) return response