Skip to content

Commit

Permalink
Cors header
Browse files Browse the repository at this point in the history
  • Loading branch information
Atomnp committed Oct 17, 2022
1 parent 2f11e1f commit 6c7e680
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions certification_system/certification_system/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"corsheaders",
"rest_framework",
"event",
"category",
Expand All @@ -41,6 +42,7 @@
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
Expand Down Expand Up @@ -131,6 +133,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

CORS_ORIGIN_ALLOW_ALL = True
ALLOWED_HOSTS = ["*"]

USE_X_FORWARDED_HOST = True

0 comments on commit 6c7e680

Please sign in to comment.