0

I am trying to deploy my web application that is written in Django, the image is build and already there, I am just deploying that image into a Kubernetes pod and running it. There is also an nginx pod that runs here. When I am trying to application via the pod and the port exposed through nginx, the error that I am getting is

Forbidden (403)
CSRF verification failed. Request aborted.

I cannot change anything in the application directly. I am not posting the deployment file here as it is too big of a file, and there there is configmap and pv also involved in the backend. The application runs on http at the moment.

The application takes me to the login page and after providing credentials it gives me this error. What are some of the things that I can try out.

noob_coder
  • 749
  • 4
  • 15
  • 35

1 Answers1

0

There was a similar concern posted in StackOverflow that may help with your concern. As per Muhammed Fayis and edited by Adrian Mole:

  "For those who are using Django==4.* or above, there must be an additional field in settings.py called CSRF_TRUSTED_ORIGINS=[] and add your domain here, Problem solved. Check this latest release."
Dion V
  • 356
  • 2
  • 7