Ticket #14134: patch.diff
File patch.diff, 1.3 KB (added by , 14 years ago) |
---|
-
django/conf/global_settings.py
484 484 # rejected by the CSRF middleware. 485 485 CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' 486 486 487 # Name and domain for CSRF cookie.488 CSRF_COOKIE_ NAME = 'csrftoken'489 CSRF_COOKIE_DOMAIN = None 487 CSRF_COOKIE_NAME = 'csrftoken' # Cookie name. 488 CSRF_COOKIE_PATH = '/' # The path of the csrf cookie. 489 CSRF_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie. 490 490 491 491 ############ 492 492 # MESSAGES # -
django/middleware/csrf.py
195 195 # Set the CSRF cookie even if it's already set, so we renew the expiry timer. 196 196 response.set_cookie(settings.CSRF_COOKIE_NAME, 197 197 request.META["CSRF_COOKIE"], max_age = 60 * 60 * 24 * 7 * 52, 198 path=settings.CSRF_COOKIE_PATH, 198 199 domain=settings.CSRF_COOKIE_DOMAIN) 199 200 # Content varies with the CSRF cookie, so set the Vary header. 200 201 patch_vary_headers(response, ('Cookie',))