Csrf verification failed with cloudflare zero trust

Django 4.2 changes how HTTPS operates from behind a reverse proxy. That’s why we exposed more HTTPS related settings.

https://docs.mayan-edms.com/releases/4.6.html#settings

Without access to your installation it is impossible to know how to address it. This is the most common settings to fix HTTPS issues now. Try adding this to your .env file. Add your exposed domain as an item in a list for MAYAN_CSRF_TRUSTED_ORIGINS

Example:

MAYAN_CSRF_TRUSTED_ORIGINS=['https://staging.mayan.cloud']

Replace https://staging.mayan.cloud with your full domain.

1 Like