Add property "authorization" to the MetaConfig interface

This property isn't properly documented (https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#meta),
but the implementation can be found here:
* 96f9ec1edf/src/fetch.js (L26)
* 96f9ec1edf/src/fetch.js (L83)
This commit is contained in:
Rudolph Gottesheim
2017-09-04 12:23:28 +02:00
parent 38894f063d
commit 022fe404df
2 changed files with 22 additions and 0 deletions

View File

@@ -111,6 +111,12 @@ declare namespace SystemJSLoader {
* Use with the SystemJS Builder. (https://github.com/systemjs/builder#ignore-resources)
*/
build?: boolean;
/**
* A truthy value enables sending credentials to the server on every request. Additionally, a string value adds
* an "Authorization" header with that value to all requests.
*/
authorization?: string | boolean;
}
interface PackageConfig {

View File

@@ -22,6 +22,22 @@ SystemJS.config({
}
});
SystemJS.config({
meta: {
'*': {
authorization: true
}
}
});
SystemJS.config({
meta: {
'*': {
authorization: 'Basic YWxhZGRpbjpvcGVuc2VzYW1l'
}
}
});
SystemJS.config({
map: {
'local/package': {