I'm on course Test-Driven Development with Django, Django REST Framework, and Docker (Michael Herman). My problem is that in a locally running container, the admin panel opens without problems, but the container placed on heroku gives an error (Forbidden (403) CSRF verification failed. Request aborted.) .. Where to look? Thanks!
I found a solution. The fact is that in Django 4.0 you need to add
CSRF_TRUSTED_ORIGINS=['https://*.YOUR_DOMAIN.COM'] to settings.py
Thanks to Zeedia:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With