Skip to content

Commit

Permalink
chore: add cors-headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Oct 7, 2023
1 parent 4e79c3f commit 55a9553
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 89 deletions.
4 changes: 4 additions & 0 deletions configs/default/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"corsheaders",
"django_prometheus",
"django_telegram_login",
"anymail",
Expand All @@ -21,10 +22,13 @@
"apps.openapi",
]

CORS_ALLOW_ALL_ORIGINS = True

MIDDLEWARE = [
"django_prometheus.middleware.PrometheusBeforeMiddleware",
"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
Loading

0 comments on commit 55a9553

Please sign in to comment.