Skip to content

Commit

Permalink
Merge pull request #5 from hrideshmg/cors
Browse files Browse the repository at this point in the history
feat: Added cors response headers
  • Loading branch information
hrideshmg authored Feb 27, 2024
2 parents 0294c4f + 4631300 commit 24b1467
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions attendence_tracker/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

INSTALLED_APPS = [
"api",
"corsheaders",
"django_celery_results",
"rest_framework.authtoken",
"rest_framework",
Expand All @@ -51,7 +52,10 @@
}

SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = False
MIDDLEWARE = [
"corsheaders.middleware.CorsMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ click-plugins==1.1.1
click-repl==0.3.0
Django==5.0.1
django-celery-results==2.5.1
django-cors-headers==4.3.1
django-redis==5.4.0
djangorestframework==3.14.0
kombu==5.3.5
prompt-toolkit==3.0.43
psycopg==3.1.17
psycopg2-binary==2.9.9
pyngrok==7.1.0
python-dateutil==2.8.2
python-dotenv==1.0.1
Expand Down

0 comments on commit 24b1467

Please sign in to comment.