Skip to content

Commit

Permalink
add: CORS_ALLOW_METHODS and CORS_ALLOW_HEADERS
Browse files Browse the repository at this point in the history
  • Loading branch information
meua committed Dec 15, 2023
1 parent 5718af5 commit e398236
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,36 @@
# Database
# https://docs.djangoproject.com/en/1.10.2/ref/settings/#databases

CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_ALL_ORIGINS = True

CORS_ORIGIN_WHITELIST = (
CORS_ALLOWED_ORIGINS = (
"https://arena.s3.cn-northwest-1.amazonaws.com.cn",
"http://arena.synkrotron.ai",
"http://beta.synkrotron.ai",
)

CORS_ALLOW_METHODS = [
'DELETE',
'GET',
'OPTIONS',
'PATCH',
'POST',
'PUT',
]

CORS_ALLOW_HEADERS = [
'accept',
'accept-encoding',
'authorization',
'content-type',
'dnt',
'origin',
'user-agent',
'x-csrftoken',
'x-requested-with',
'noMessage',
]

DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
Expand Down

0 comments on commit e398236

Please sign in to comment.