mirror of
https://github.com/unraid/webgui.git
synced 2026-03-09 04:21:27 -05:00
Don't send csrf token with crossdomain requests
This commit is contained in:
@@ -277,8 +277,9 @@ var device=navigator.platform.toLowerCase();
|
||||
for (var i=0,mobile; mobile=mobiles[i]; i++) {
|
||||
if (device.indexOf(mobile)>=0) {$('#footer').css('position','static'); break;}
|
||||
}
|
||||
$(document).ajaxSend(function(elm, xhr, s){
|
||||
if (s.type == "POST") {
|
||||
$.ajaxPrefilter(function(s, orig, xhr){
|
||||
if (s.type == "post" && !s.crossDomain) {
|
||||
s.data = s.data || "";
|
||||
s.data += s.data?"&":"";
|
||||
s.data += "csrf_token=<?=$var['csrf_token']?>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user