From 1168bff7c995719659018b9b141d01c35c63224f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 17 Oct 2023 15:06:19 +0200 Subject: [PATCH] Completer.js: Include `X-Requested-With` in completion requests fixes #212 --- asset/js/widget/Completer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/asset/js/widget/Completer.js b/asset/js/widget/Completer.js index a498d823..6d603802 100644 --- a/asset/js/widget/Completer.js +++ b/asset/js/widget/Completer.js @@ -213,6 +213,7 @@ define(["../notjQuery"], function ($) { this.nextSuggestion = setTimeout(() => { let req = new XMLHttpRequest(); req.open('POST', this.input.dataset.suggestUrl, true); + req.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); req.setRequestHeader('Content-Type', 'application/json'); if (typeof icinga !== 'undefined') {