Search code examples
djangoxsssession-cookies

How do I set HttpOnly cookie in Django?


How do I set HttpOnly cookie in Django?

And is it worth the effort to prevent XSS?


Solution

  • SESSION_COOKIE_PATH = '/;HttpOnly'
    

    A discussion can be found here: http://groups.google.com/group/django-users/browse_thread/thread/bd7f562d5b938054/a229073ae836f4d2?lnk=raot&pli=1