From 2861d99de4d329bcba0a3c2193523398a22673c0 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 23 Dec 2014 20:33:42 +0100 Subject: web: intercept feature --- web/src/js/components/utils.jsx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/src/js/components/utils.jsx.js') diff --git a/web/src/js/components/utils.jsx.js b/web/src/js/components/utils.jsx.js index 81ba6b4d..20dbda94 100644 --- a/web/src/js/components/utils.jsx.js +++ b/web/src/js/components/utils.jsx.js @@ -113,7 +113,7 @@ var xsrf = $.param({_xsrf: getCookie("_xsrf")}); //Tornado XSRF Protection. $.ajaxPrefilter(function (options) { - if (options.type === "post" && options.url[0] === "/") { + if (["post","put","delete"].indexOf(options.type.toLowerCase()) >= 0 && options.url[0] === "/") { if (options.data) { options.data += ("&" + xsrf); } else { -- cgit v1.2.3