Django CSRF cookie HttpOnly

Mark picture Mark · Jun 2, 2012 · Viewed 14.5k times · Source

Is it possible to set the django csrf cookie to be http-only? Alike to SESSION_COOKIE_HTTPONLY with session cookie, but for the csrf one?

Answer

knite picture knite · Aug 27, 2013

A new setting, CSRF_COOKIE_HTTPONLY, is available in Django 1.6+.