0👍
✅
The fault was all on my side. By checking the server logs I realized that not Alfred was throwing the error but the Proxy (django-httpproxy). Probably, because both servers are running on localhost, and I’m sending my requests from localhost as well. I disabled CSRF for both, Proxy and Alfred.
With this setup i don’t get any 403 Errors anymore.
Unfortunately, the django-httpproxy looses cookies, so I can’t log in because of that.
Lesson learned: don’t use django-httpproxy as reverse proxy.
3👍
You can use the @csrf_exempt decorator on the view functions to disable csrf for that view.
See the documentation
- [Django]-CSRF Middleware – change csrf_token output (from xHTML to HTML)
- [Django]-Djang views and urls connect
- [Django]-Django: Direct assignment to the forward side of a many-to-many set is prohibited. Use user.set() instead
- [Django]-Creating custom list filter in django
- [Django]-Django incorporating ads
Source:stackexchange.com