1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 14:29:36 +02:00

feat: Sanitize FRONTEND_URL by removing quotes for improved URL parsing

This commit is contained in:
Sean Morley 2025-01-27 09:23:48 -05:00
parent 680a2378d9
commit 3468e82b04

View file

@ -127,13 +127,16 @@ USE_L10N = True
USE_TZ = True
FRONTEND_URL = getenv('FRONTEND_URL', 'http://localhost:3000')
unParsedFrontenedUrl = getenv('FRONTEND_URL', 'http://localhost:3000')
FRONTEND_URL = unParsedFrontenedUrl.replace("'", "").replace('"', '')
SESSION_COOKIE_SAMESITE = None
SESSION_COOKIE_SECURE = FRONTEND_URL.startswith('https')
# Parse the FRONTEND_URL
# Remove and ' from the URL
parsed_url = urlparse(FRONTEND_URL)
hostname = parsed_url.hostname