mirror of
https://github.com/photonstorm/phaser
synced 2025-01-11 04:38:51 +00:00
Added support for multiple Loader headers
This commit is contained in:
parent
3bf3057da0
commit
d88201604c
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue