1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 05:49:37 +02:00

fix: dynamically set session cookie domain based on request hostname

This commit is contained in:
Sean Morley 2025-01-13 18:06:16 -05:00
parent 062111d7fe
commit 4a36fbb4c1
2 changed files with 22 additions and 3 deletions

View file

@ -135,7 +135,6 @@ frontend_url = getenv('FRONTEND_URL', 'http://localhost:3000')
parsed_url = urlparse(frontend_url)
domain_parts = parsed_url.hostname.split('.')
SESSION_COOKIE_DOMAIN = '.' + '.'.join(domain_parts[-2:]) if len(domain_parts) > 1 else parsed_url.hostname
print(SESSION_COOKIE_DOMAIN)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/