Commit f36bf01f authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Allow the https dev webapp origin in CORS

Companion to the webapp's basicSsl dev server change (needed to fix
the Geolocation API being blocked entirely on the old http:// dev
origin - browsers require a secure context). Without this, the
webapp's requests from https://144.76.210.145:5173 would get rejected
by CORS even though geolocation itself would now work.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 5e02a15d
Pipeline #1057 passed with stage
in 3 minutes and 12 seconds
...@@ -19,7 +19,9 @@ DOCS_PASSWORD = os.getenv("DOCS_PASSWORD") ...@@ -19,7 +19,9 @@ DOCS_PASSWORD = os.getenv("DOCS_PASSWORD")
# cookie, so allowing these origins doesn't need allow_credentials. # cookie, so allowing these origins doesn't need allow_credentials.
CORS_ORIGINS = [o.strip() for o in os.getenv( CORS_ORIGINS = [o.strip() for o in os.getenv(
"CORS_ORIGINS", "CORS_ORIGINS",
"http://localhost:5173,http://127.0.0.1:5173,http://144.76.210.145:5173", # https variant needed for the dev webapp's self-signed TLS (see vite.config.ts's
# basicSsl plugin) - the Geolocation API refuses to run at all on a plain http:// origin.
"http://localhost:5173,http://127.0.0.1:5173,http://144.76.210.145:5173,https://144.76.210.145:5173",
).split(",") if o.strip()] ).split(",") if o.strip()]
# Signs every access/refresh JWT. Every request goes through this, so unlike the other keys # Signs every access/refresh JWT. Every request goes through this, so unlike the other keys
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment