Skip to content

Commit

Permalink
Fix CORS to work with other middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
n8kim1 committed Nov 14, 2022
1 parent 10e6eb5 commit 98c5b87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/siarnaq/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@
]

MIDDLEWARE = [
# Place CORS first. See https://stackoverflow.com/a/45376281
"corsheaders.middleware.CorsMiddleware",
"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",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"corsheaders.middleware.CorsMiddleware",
]

CORS_ORIGIN_ALLOW_ALL = True
Expand Down

0 comments on commit 98c5b87

Please sign in to comment.