Notifications
Clear all
Automate the Boring Stuff with Django
1
Posts
2
Users
0
Reactions
23
Views
0
25/11/2024 4:20 am
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
26/11/2024 11:29 am
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:
This should resolve the issue. If you still encounter any problems, feel free to ask!