Changes between Initial Version and Version 1 of Ticket #14134, comment 3
- Timestamp:
- May 9, 2011, 4:54:47 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #14134, comment 3
initial v1 5 5 6 6 Simply added in settings.py: 7 7 {{{ 8 8 CSRF_COOKIE_SECURE = True 9 9 }}} 10 10 And in django/middleware/csrf.py 11 11 {{{ 12 12 # Set the CSRF cookie even if it's already set, so we renew the expiry timer. 13 13 response.set_cookie(settings.CSRF_COOKIE_NAME, 14 14 request.META["CSRF_COOKIE"], max_age = 60 * 60 * 24 * 7 * 52, 15 15 domain=settings.CSRF_COOKIE_DOMAIN,secure=settings.CSRF_COOKIE_SECURE) 16 }}} 16 17 17 18 18 19 Not much to it really and now my cookies are set as secure just lime the Session cookie 19 Not much to it really and now my cookies are set as secure just like the Session cookie