Skip to content

Commit

Permalink
chore: cors 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfla committed Aug 1, 2024
1 parent c26d418 commit 0286b37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mustgou/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
]

MIDDLEWARE = [
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
Expand Down Expand Up @@ -120,10 +121,9 @@
]
}

# CORS 관련 추가(모든 포트 허용)
CORS_ALLOW_ALL_ORIGINS = True

# HTTP methods 추가
CORS_ALLOWED_ORIGINS = config("CORS_ALLOWED_ORIGINS", default="").split(",")

CORS_ALLOW_METHODS = {
"DELETE",
"GET",
Expand Down

0 comments on commit 0286b37

Please sign in to comment.