fix(core.gbapp): FIX SSR errors and setOption impersonated.
This commit is contained in:
parent
f4b22ce747
commit
5589095f86
1 changed files with 4 additions and 8 deletions
|
@ -284,14 +284,10 @@ export class GBSSR {
|
||||||
// Tries to find botId from URL.
|
// Tries to find botId from URL.
|
||||||
|
|
||||||
const minBoot = GBServer.globals.minBoot;
|
const minBoot = GBServer.globals.minBoot;
|
||||||
let botId = minBoot.botId;
|
let botId =
|
||||||
if (req.originalUrl && req.originalUrl === '/') {
|
req.originalUrl && req.originalUrl === '/' ?
|
||||||
let tmp = /\/([A-Za-z0-9\-\_]+)\/*/.exec(req.originalUrl);
|
minBoot.botId :
|
||||||
if (tmp) {
|
/\/([A-Za-z0-9\-\_]+)\/*/.exec(req.originalUrl)[1]
|
||||||
botId = tmp[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let min: GBMinInstance =
|
let min: GBMinInstance =
|
||||||
req.url === '/'
|
req.url === '/'
|
||||||
? minBoot
|
? minBoot
|
||||||
|
|
Loading…
Add table
Reference in a new issue