Skip to content

Commit

Permalink
Merge pull request #8 from nens/cors
Browse files Browse the repository at this point in the history
allowed cors
  • Loading branch information
JJFlorian authored Mar 20, 2024
2 parents 2076eb8 + 3b07940 commit b817256
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bro_hub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"django.contrib.staticfiles",
"rest_framework",
"drf_yasg",
"corsheaders",
"django_filters",
"rest_framework_simplejwt",
"encrypted_model_fields",
Expand All @@ -54,6 +55,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"corsheaders.middleware.CorsMiddleware",
]

ROOT_URLCONF = "bro_hub.urls"
Expand All @@ -76,6 +78,9 @@

WSGI_APPLICATION = "bro_hub.wsgi.application"

CORS_ALLOWED_ORIGINS = [
"http://localhost:4200",
]

# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
django == 5.0.1
psycopg2-binary
djangorestframework
django-cors-headers
drf-yasg
celery
redis
Expand Down

0 comments on commit b817256

Please sign in to comment.