Fix broken mapping between scriptlet aliases and canonical name

Related commit:
bf591d93fb
This commit is contained in:
Raymond Hill 2023-08-14 13:09:19 -04:00
parent c32c39fa6b
commit 62f2a3e68d
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
2 changed files with 7 additions and 7 deletions

View file

@ -1954,13 +1954,13 @@ function noXhrIf(
}
if ( directive.startsWith('war:') ) {
if ( warOrigin === undefined ) { return ''; }
const warName = directive.slice(4);
const fullpath = [ warOrigin, '/', warName ];
const warSecret = scriptletGlobals.get('warSecret') || '';
if ( warSecret !== '' ) {
fullpath.push('?secret=', warSecret);
}
return new Promise(resolve => {
const warName = directive.slice(4);
const fullpath = [ warOrigin, '/', warName ];
const warSecret = scriptletGlobals.get('warSecret');
if ( warSecret !== undefined ) {
fullpath.push('?secret=', warSecret);
}
const warXHR = new XMLHttpRequest();
warXHR.responseType = 'text';
warXHR.onloadend = ev => {

View file

@ -334,7 +334,7 @@ class RedirectEngine {
this.resources.set(details.name, entry);
if ( Array.isArray(details.aliases) === false ) { continue; }
for ( const alias of details.aliases ) {
this.aliases.set(alias, name);
this.aliases.set(alias, details.name);
}
}
this.modifyTime = Date.now();