Changes between Initial Version and Version 1 of Ticket #14134, comment 3


Ignore:
Timestamp:
May 9, 2011, 4:54:47 PM (13 years ago)
Author:
Luke Plant

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14134, comment 3

    initial v1  
    55
    66Simply added in settings.py:
    7 
     7{{{
    88CSRF_COOKIE_SECURE = True
    9 
     9}}}
    1010And in django/middleware/csrf.py
    11 
     11{{{
    1212# Set the CSRF cookie even if it's already set, so we renew the expiry timer.
    1313        response.set_cookie(settings.CSRF_COOKIE_NAME,
    1414                request.META["CSRF_COOKIE"], max_age = 60 * 60 * 24 * 7 * 52,
    1515                domain=settings.CSRF_COOKIE_DOMAIN,secure=settings.CSRF_COOKIE_SECURE)
     16}}}
    1617
    1718
    18 
    19 Not much to it really and now my cookies are set as secure just lime the Session cookie
     19Not much to it really and now my cookies are set as secure just like the Session cookie
Back to Top