Django application hosted on AWS LightSail domain mapping with Cloudflare

Question: How to make Django CSRF cookie compatible with Cloudflare?

Description:

Before: I create a DNS zone on LightSail, add nameservers to the domain provider, Everything works.

Now: Since I want a ddos protection and CDNs from Cloudflare, I use the default Cloudflare nameservers, I create a static IP address on Lightsail with an A record on Cloudflare linked to that static IP address, All GET requests work, But no POST requests, As if the user has disabled cookies in browser settings.

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