diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2011-05-09 23:46:02 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2011-05-09 23:46:02 +0000 |
| commit | 396bc58889005f9524edeef2ed9a13f49adc84a1 (patch) | |
| tree | 018dad4c70bd68e9cecc4f99911b8293c42419bf /docs | |
| parent | cb060f0f340356ac71ed7db5399753edce278766 (diff) | |
Updated AJAX example code in CSRF docs to be consistent regarding what are safe HTTP methods
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/csrf.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/ref/contrib/csrf.txt b/docs/ref/contrib/csrf.txt index 9441393c81..a3cf2ca963 100644 --- a/docs/ref/contrib/csrf.txt +++ b/docs/ref/contrib/csrf.txt @@ -117,7 +117,7 @@ that allow headers to be set on every request. In jQuery, you can use the !(/^(\/\/|http:|https:).*/.test(url)); } function safeMethod(method) { - return (method === 'GET' || method === 'HEAD'); + return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); } if (!safeMethod(settings.type) && sameOrigin(settings.url)) { |
