Skip to content

Commit

Permalink
Merge pull request #1948 from iamkarlson/feature/fix_csrf_django_40
Browse files Browse the repository at this point in the history
fixed csrf
  • Loading branch information
vabene1111 authored Aug 1, 2022
2 parents 02cf326 + 897ac97 commit ea213e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recipes/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@

ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS').split(',') if os.getenv('ALLOWED_HOSTS') else ['*']

if os.getenv('CSRF_TRUSTED_ORIGINS'):
CSRF_TRUSTED_ORIGINS = os.getenv('CSRF_TRUSTED_ORIGINS').split(',')

CORS_ORIGIN_ALLOW_ALL = True

LOGIN_REDIRECT_URL = "index"
Expand Down

0 comments on commit ea213e2

Please sign in to comment.