X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/d41452f39c90deaca98b4fe0e8c87f7d7aa395b8..refs/pull/2272/head:/resources/js/services/http.js diff --git a/resources/js/services/http.js b/resources/js/services/http.js index 5b5e1c496..8ecd6c109 100644 --- a/resources/js/services/http.js +++ b/resources/js/services/http.js @@ -69,7 +69,10 @@ async function dataRequest(method, url, data = null) { // Send data as JSON if a plain object if (typeof data === 'object' && !(data instanceof FormData)) { - options.headers = {'Content-Type': 'application/json'}; + options.headers = { + 'Content-Type': 'application/json', + 'X-Requested-With': 'XMLHttpRequest', + }; options.body = JSON.stringify(data); }