settting cors

This commit is contained in:
Irwan Cahyono 2025-07-01 16:28:28 +07:00
parent 74ea8942cc
commit 3599d6d7fb

View File

@ -150,9 +150,8 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# "http://localhost:5173",
# "http://127.0.0.1:5173",
# ]
CORS_ALLOWED_ORIGINS = config(
"CORS_ALLOWED_ORIGINS",
default="http://localhost:3000,http://localhost:5173,http://127.0.0.1:5173", cast=Csv())
CORS_ALLOWED_ORIGINS = config('CORS_ALLOWED_ORIGINS', cast=Csv(), default=[])
CORS_ALLOW_CREDENTIALS = True
REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS':