CSRF Failed: Origin checking failed
After version 1.78 if running Valispace behind a reverse proxy, it’s possible to get the following error:
CSRF Failed: Origin checking failed - https://[domain] does not match any trusted origins.
To resolve the problem without modifying NGINX configurations in client side, this needs to be done:
- CODE
cd /var/valispace/docker echo 'SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "http")' >> valispace_local_settings.py ./valispace-manager.sh restart
In the case that your deployment is not running behind a Reverse Proxy and you are getting the “CSRF Failed: Origin checking failed” then you can add the trusted Origin into your settings ( Replace the variable YOUR_DOMAIN by the domain used to access your deployment:
- CODE
cd /var/valispace/docker echo 'CSRF_TRUSTED_ORIGINS = ['https://[YOUR_DOMAIN]']' >> valispace_local_settings.py ./valispace-manager.sh restart