From 7c648ea4aa2339cf0492d8c8da031dccce5458b1 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 9 May 2011 19:06:49 +0000 Subject: [PATCH] Mentioned simplification of AJAX example code in CSRF docs. Refs #15469. Thanks to aaugustin for the suggestion git-svn-id: http://code.djangoproject.com/svn/django/trunk@16190 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/contrib/csrf.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/ref/contrib/csrf.txt b/docs/ref/contrib/csrf.txt index 8c00304560..6d9a33db22 100644 --- a/docs/ref/contrib/csrf.txt +++ b/docs/ref/contrib/csrf.txt @@ -123,6 +123,11 @@ Adding this to a javascript file that is included on your site will ensure that AJAX POST requests that are made via jQuery will not be caught by the CSRF protection. +The above code could be simplified by using the `jQuery cookie plugin +`_ to replace ``getCookie``, and +`settings.crossDomain `_ in jQuery 1.5 and +later to replace ``sameOrigin``. + The decorator method --------------------