From d88201604c60d1e23228a54e89fa22243c428d33 Mon Sep 17 00:00:00 2001 From: jorbascrumps Date: Tue, 25 Jun 2019 19:26:16 -0400 Subject: [PATCH] Added support for multiple Loader headers --- src/loader/XHRLoader.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/loader/XHRLoader.js b/src/loader/XHRLoader.js index 3ccf4f960..a66ed570a 100644 --- a/src/loader/XHRLoader.js +++ b/src/loader/XHRLoader.js @@ -30,6 +30,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue);