From 937c8f6208f3adf713b10a349a82a1b129bd0ffd Mon Sep 17 00:00:00 2001 From: dalbrx-forcam Date: Fri, 15 Feb 2019 00:20:06 +0100 Subject: [PATCH] improvement: set `X-Requested-With` to prevent browser authentication dialog (via #4934) --- src/core/plugins/auth/actions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/plugins/auth/actions.js b/src/core/plugins/auth/actions.js index 35afbc0d..23163b71 100644 --- a/src/core/plugins/auth/actions.js +++ b/src/core/plugins/auth/actions.js @@ -168,7 +168,8 @@ export const authorizeRequest = ( data ) => ( { fn, getConfigs, authActions, err let _headers = Object.assign({ "Accept":"application/json, text/plain, */*", - "Content-Type": "application/x-www-form-urlencoded" + "Content-Type": "application/x-www-form-urlencoded", + "X-Requested-With": "XMLHttpRequest" }, headers) fn.fetch({ -- GitLab