Skip to content

Commit

Permalink
Whitelist localhost from CSRF
Browse files Browse the repository at this point in the history
  • Loading branch information
aviupadhyayula committed Feb 21, 2024
1 parent 8160776 commit 36bb1f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/pennclubs/settings/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
from pennclubs.settings.base import INSTALLED_APPS, MIDDLEWARE


# Enable debug mode
DEBUG = True

# Development extensions
INSTALLED_APPS += ["django_extensions", "debug_toolbar"]

Expand All @@ -13,6 +16,9 @@
# Allow http callback for DLA
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"

# Allow requests from frontend
CSRF_TRUSTED_ORIGINS = ["http://localhost:3000"]

# Use console email backend during development
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"

Expand Down

0 comments on commit 36bb1f8

Please sign in to comment.