Allow Capacitor WebView origins in CORS/CSRF (#22)
Merge https://localhost and capacitor://localhost into CORS_ALLOWED_ORIGINS and CSRF_TRUSTED_ORIGINS so JWT API calls from native shells pass origin checks without cookie credentials.
This commit is contained in:
@@ -18,6 +18,7 @@ DJANGO_DEBUG=false
|
||||
DJANGO_SECRET_KEY=replace-with-a-long-random-secret
|
||||
DJANGO_ALLOWED_HOSTS=chatbackend.aimloperations.com
|
||||
# Optional override; when unset, https:// origins are derived from DJANGO_ALLOWED_HOSTS.
|
||||
# Capacitor WebView origins (https://localhost, capacitor://localhost) are always merged in code.
|
||||
# DJANGO_CSRF_TRUSTED_ORIGINS=https://chatbackend.aimloperations.com,https://chat.aimloperations.com
|
||||
CORS_ALLOWED_ORIGINS=https://chat.aimloperations.com
|
||||
CORS_ORIGIN_ALLOW_ALL=false
|
||||
|
||||
Reference in New Issue
Block a user