Skip to content

Commit

Permalink
fix: TUP-706 A.1.a. cannot login to site 2
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Jul 23, 2024
1 parent a461693 commit 6bece39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions taccsite_cms/middleware/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6bece39

Please sign in to comment.