79296118

Date: 2024-12-20 03:45:44
Score: 1
Natty:
Report link

First, I want to show useful debugging tips for CSRF. Developer tools Network tab show useful information.

CSRF Debugging

My problem was that I am accessing site in http rather than https. But since this is development environment, and for debugging purpose, CSRF_COOKIE_SECURE should be False. But I already set CSRF_COOKIE_SECURE=False in .env. My issue was that CSRF_COOKIE_SECURE read from .env file but it read as str instead of bool which is causing the issue.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Pyae