aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-08-15 14:58:33 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-08-15 14:58:33 +0300
commita464f991e25309e0200eebb6ab3aa2da2ffa1d85 (patch)
tree04c3c901bb6d8481d9fdfa9ce4802c0a81740e2d /interface
parent6e11dca58aaa6d31e31dffacc78012099ae36e21 (diff)
downloadrspamd-a464f991e25309e0200eebb6ab3aa2da2ffa1d85.tar.gz
rspamd-a464f991e25309e0200eebb6ab3aa2da2ffa1d85.zip
[Minor] Use Ajax "headers" parameter
to set custom headers
Diffstat (limited to 'interface')
-rw-r--r--interface/js/app/rspamd.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 06d9a46f9..32a1ad297 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -195,15 +195,7 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
var req_params = {
jsonp: false,
data: o.data,
- beforeSend: function (xhr) {
- xhr.setRequestHeader("Password", getPassword());
-
- if (o.headers) {
- $.each(o.headers, function (hname, hvalue) {
- xhr.setRequestHeader(hname, hvalue);
- });
- }
- },
+ headers: $.extend({Password: getPassword()}, o.headers),
url: neighbours_status[ind].url + req_url,
success: function (json) {
neighbours_status[ind].checked = true;