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:
parent
680a2378d9
commit
3468e82b04
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue