setting cors

This commit is contained in:
Irwan Cahyono 2025-07-01 16:17:53 +07:00
parent 2655518a86
commit 74ea8942cc

View File

@ -145,11 +145,14 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
"http://localhost:5173",
"http://127.0.0.1:5173",
]
# CORS_ALLOWED_ORIGINS = [
# "http://localhost:3000",
# "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())
REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS':