"CSRF verification failed" with HAProxy SSL Offloading

Hi everybody,
I’m using Haproxy to offload SSL so that I can connect using HTTPS to a service (running in my backend) which is HTTP only.
It seems to work correctly, as the landing page displays correctly.
However, as soon as I try to login (the service offers an administration page) I get the error “CSRF verification failed”.
The backend service is written in django: I’m not fluent in django and, if possible, I’d like not to have to contact the original programmer who wrote the service.
Can you help me understand the issue and see if I have any way out without modifying the service code?

Thank you in advance!
Cris

Hi Cris,
Did you solve it?

I have some problem.

Hi Davide, yes I solved it.
I had the problem with a dockerized application that was in development.
It used the django internal server, and that is what was causing the problem.
I rebuilt the docker image using uwsgi and nginx and now it is working fine.