1

There are 1 best solutions below

2
Vinita Sonakiya On

I think you forgot to add your domain in CSRF_TRUSTED_ORIGINS.

Just add the domain in CSRF_TRUSTED_ORIGINS in your settings file like this.

For django 4 and above

CSRF_TRUSTED_ORIGINS = ['https://yourdomain.com']

For django 3 and lower version, no need to mention scheme

CSRF_TRUSTED_ORIGINS = ['yourdomain.com']

Read here to get further details : CSRF_TRUSTED_ORIGINS