Notifications
Clear all
1 Posts
2 Users
0 Reactions
23 Views
0
Topic starter

Forbidden (403)

CSRF verification failed. Request aborted.

I have not yet closed the port above, but I am seeing the CRSF at this time

1 Answer
0

Hi Kintu Alex Ladwong,

The error you're encountering is likely because you are using Ngrok. When using Ngrok, you need to add your Ngrok URL to the CSRF_TRUSTED_ORIGINS setting in your Django project. This allows Django to recognize the Ngrok URL as a trusted source for CSRF validation.

To do this, open your settings.py file and add the Ngrok URL like this:

CSRF_TRUSTED_ORIGINS = [ 'https://98c4-197-239-13-114.ngrok-free.app',]

This should resolve the issue. If you still encounter any problems, feel free to ask!

Share: