Maybe @csrf_check_header_only? I usually put the token in POST for my ajax calls.
On Monday, November 16, 2015 at 12:51:18 AM UTC-5, Curtis Maloney wrote: > > > So I recently ran into the csrf/upload_handlers conflict as mentioned in > the not > https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/#id1 > > I'd like to propose an additional option to solve this -- a decorator to > mark a view as "ajax-only" ... so the CSRF middleware will _only_ check > the header for the value, and skip request.POST. > > Of course, this sort of change should involve a serious consideration to > the security ramifications of such a change. > > So please... weigh in, one and all :) > > -- > Curtis > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/89eed5bb-b748-46b8-9549-1d12d009e2d6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
