From: Stas Vilchik Date: Tue, 1 Nov 2016 09:11:36 +0000 (+0100) Subject: SONAR-8237 Web UI is not working correctly on Edge X-Git-Tag: 6.2-RC1~234 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=03924a62688e3e4510ff0f81e7fa463609fb6fdb;p=sonarqube.git SONAR-8237 Web UI is not working correctly on Edge --- 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 } : {}; } /**