Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.3.X] Updated AJAX example code in CSRF docs to be consistent regar…

…ding what are safe HTTP methods

Backport of [16202] from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit fda65ffea57bf6f15a94f37c4ab74352f679e282 1 parent af1943f
@spookylukey spookylukey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/ref/contrib/csrf.txt
2  docs/ref/contrib/csrf.txt
@@ -125,7 +125,7 @@ that allow headers to be set on every request. In jQuery, you can use the
function safeMethod(method) {
- return (method === 'GET' || method === 'HEAD');
+ return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
if (!safeMethod(settings.type) && sameOrigin(settings.url)) {
Please sign in to comment.
Something went wrong with that request. Please try again.