Skip to content

Commit

Permalink
Attempt to remove CSRF verification error that came with Django 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Godsmith committed Jul 23, 2023
1 parent 75dd717 commit cc65e6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dinrplan/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@

ALLOWED_HOSTS = ["0.0.0.0", ".localhost", "127.0.0.1", "[::1]", "dinrplan.fly.dev"]

# Needed to avoid CSRF verification failed in Django 4.x
# See https://docs.djangoproject.com/en/4.0/ref/settings/#secure-proxy-ssl-header
# and https://stackoverflow.com/a/71482883/584503
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

# Application definition

INSTALLED_APPS = [
Expand Down

0 comments on commit cc65e6d

Please sign in to comment.