fix(all): Minor changes in PROD.
This commit is contained in:
parent
b7f78d936f
commit
671fe0cc3e
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************\
|
/*****************************************************************************\
|
||||||
| ( )_ _ |
|
| ( )_ _ |
|
||||||
| _ _ _ __ _ _ __ ___ ___ _ _ | ,_)(_) ___ ___ _ |
|
| _ _ _ __ _ _ __ ___ ___ _ _ | ,_)(_) ___ ___ _ |
|
||||||
|
@ -88,6 +90,7 @@ export class GBAdminService implements IGBAdminService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getADALCredentialsFromUsername(username: string, password: string) {
|
public static async getADALCredentialsFromUsername(username: string, password: string) {
|
||||||
|
|
||||||
return await msRestAzure.loginWithUsernamePassword(username, password);
|
return await msRestAzure.loginWithUsernamePassword(username, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -311,7 +311,8 @@ export class GBSSR {
|
||||||
if (!Fs.existsSync(path)) {
|
if (!Fs.existsSync(path)) {
|
||||||
path = DialogKeywords.getGBAIPath(minBoot.botId, `gbui`);
|
path = DialogKeywords.getGBAIPath(minBoot.botId, `gbui`);
|
||||||
}
|
}
|
||||||
const url = req.url.replace(`/${botId}`, '');
|
let parts = req.url.replace(`/${botId}`, '').split('?');
|
||||||
|
let url = parts[0];
|
||||||
|
|
||||||
if (min && req.originalUrl && prerender && exclude) {
|
if (min && req.originalUrl && prerender && exclude) {
|
||||||
|
|
||||||
|
@ -335,12 +336,13 @@ export class GBSSR {
|
||||||
if (GBServer.globals.wwwroot && url === '/') {
|
if (GBServer.globals.wwwroot && url === '/') {
|
||||||
path = GBServer.globals.wwwroot + "/index.html"; // TODO.
|
path = GBServer.globals.wwwroot + "/index.html"; // TODO.
|
||||||
}
|
}
|
||||||
if (!min) {
|
if (!min && !url.startsWith("/static")) {
|
||||||
path = Path.join(GBServer.globals.wwwroot, url);
|
path = Path.join(GBServer.globals.wwwroot, url);
|
||||||
}
|
}
|
||||||
if (Fs.existsSync(path)) {
|
if (Fs.existsSync(path)) {
|
||||||
if (min) {
|
if (min) {
|
||||||
let html = Fs.readFileSync(path, 'utf8');
|
let html = Fs.readFileSync(path, 'utf8');
|
||||||
|
html = html.replace(/\{p\}/gi, min.botId);
|
||||||
html = html.replace(/\{botId\}/gi, min.botId);
|
html = html.replace(/\{botId\}/gi, min.botId);
|
||||||
html = html.replace(/\{theme\}/gi, min.instance.theme ? min.instance.theme :
|
html = html.replace(/\{theme\}/gi, min.instance.theme ? min.instance.theme :
|
||||||
'default.gbtheme');
|
'default.gbtheme');
|
||||||
|
|
Loading…
Add table
Reference in a new issue