Monday, November 24, 2014

How to deal with CSRF middleware from a crawler

Hallöchen!

We use crawlers, which in our case a Python scripts that read data
from disk and send a lot of HTTP POST requests to the Django
deployment. The POST requests hit the same URLs/Views that are also
used by the browser to edit something with a web <form>.

If I activate the CSRF middleware, does this mean that our crawlers
have to make GET requests before every POST in order to get the CSRF
token? This would slow down them significantly ... Can one exclude
certain usernames from the CSRF checks? Or do you see another way
of keeping the number of HTTP requests small in the crawlers?

Tschö,
Torsten.

--
Torsten Bronger Jabber ID: torsten.bronger@jabber.rwth-aachen.de
or http://bronger-jmp.appspot.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/87mw7gqshq.fsf%40physik.rwth-aachen.de.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment