Merge pull request #19541 from MidnightDesign/systemjs-authorization

SystemJS: Add property "authorization" to the MetaConfig interface
This commit is contained in:
Daniel Rosenwasser
2017-09-05 00:41:11 -07:00
committed by GitHub
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': {