8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7342784 commit ce06ef5Copy full SHA for ce06ef5
docs/ref/contrib/csrf.txt
@@ -190,9 +190,8 @@ jQuery 1.5 and newer in order to replace the ``sameOrigin`` logic above:
190
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
191
}
192
$.ajaxSetup({
193
- crossDomain: false, // obviates need for sameOrigin test
194
beforeSend: function(xhr, settings) {
195
- if (!csrfSafeMethod(settings.type)) {
+ if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
196
xhr.setRequestHeader("X-CSRFToken", csrftoken);
197
198
0 commit comments