From 03924a62688e3e4510ff0f81e7fa463609fb6fdb Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 1 Nov 2016 10:11:36 +0100 Subject: [PATCH] SONAR-8237 Web UI is not working correctly on Edge --- server/sonar-web/src/main/js/helpers/request.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/src/main/js/helpers/request.js b/server/sonar-web/src/main/js/helpers/request.js index 74a48d84334..349392af366 100644 --- a/server/sonar-web/src/main/js/helpers/request.js +++ b/server/sonar-web/src/main/js/helpers/request.js @@ -38,7 +38,10 @@ export function getCSRFTokenValue () { * @returns {Object} */ export function getCSRFToken () { - return { [getCSRFTokenName()]: getCSRFTokenValue() }; + // Fetch API in Edge doesn't work with empty header, + // so we ensure non-empty value + const value = getCSRFTokenValue(); + return value ? { [getCSRFTokenName()]: value } : {}; } /** -- 2.39.5