Csrf verification failed with cloudflare zero trust

hi all, im using cloudflare zero trust tunnels to provide external access to my test environment.

but… since i updated to 4.6 it returns an error when i press login. the first page loads fine, i cen input my user and pass but after that nothing, nada, zilch… only this error.

can any1 point me into the solution ?


Proibido (403)

A verificação de CSRF falhou. Pedido abortado.

Está disponível mais informação com DEBUG=True.

Django 4.2 changes how HTTPS operates from behind a reverse proxy. That’s why we exposed more HTTPS related 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



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

1 Like

Working now !!!


1 Like

This topic was automatically closed 8 hours after the last reply. New replies are no longer allowed.