Fix CSRF error
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-08 15:23:04 +01:00
parent c9b2d5bd8d
commit d3682368b4
2 changed files with 7 additions and 6 deletions

View File

@ -145,7 +145,8 @@ LOGGING = {
},
}
CSRF_TRUSTED_ORIGINS = []
if os.environ.get("PROD"):
CSRF_TRUSTED_ORIGINS.append(os.environ.get("CSRF_TRUSTED_ORIGINS"))
_csrf_trusted_origins = os.environ.get("CSRF_TRUSTED_ORIGINS")
if _csrf_trusted_origins:
CSRF_TRUSTED_ORIGINS = _csrf_trusted_origins.split(",")
else:
CSRF_TRUSTED_ORIGINS = []