dudarev / photoplanet

Project for learnpython.dn.ua
http://dudarev.github.io/photoplanet/
7 stars 7 forks source link

CSRF cookie is not set when visiting arbitrary view #2

Closed dudarev closed 11 years ago

dudarev commented 11 years ago

When visiting arbitrary view CSRF token is not set. As a result 403 errors when voting.

They can be fixed by visiting feedback form. Then the cookie is set.

This probably can be fixed by using CSRF Middleware.

http://stackoverflow.com/questions/6065503/why-does-django-not-generate-csrf-or-session-cookies-behind-a-varnish-proxy

dudarev commented 11 years ago

https://github.com/mitar/django-missing/blob/master/missing/views.py#L7

dudarev commented 11 years ago

Implemented with fcc1f5e8280c3ef59562b2b367150efd6d74e762