Skip to content

Fix csrf verification failed

Rubankumar Moorthy requested to merge Fix-CSRF-verification-failed into main

Issue with CSRF_TRUSTED_ORIGINS setting in Django 4.0

During the SMS staging deployment with Portainer, we encountered a CSRF origin checking failure issue. The error message is as follows:

Origin checking failed - https://sms-staging.ibg3container.ibg.kfa-juelich.de does not match any trusted origins.

image

Proposed Solution:

Considering the CSRF origin checking failure, a proposed solution is to update the CSRF_TRUSTED_ORIGINS in the Django settings. If we plan to include both http and https origins in our CSRF_TRUSTED_ORIGINS, we can modify the Django settings accordingly.

Merge request reports

Loading