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.
|
||||
|
||||
const minBoot = GBServer.globals.minBoot;
|
||||
let botId = minBoot.botId;
|
||||
if (req.originalUrl && req.originalUrl === '/') {
|
||||
let tmp = /\/([A-Za-z0-9\-\_]+)\/*/.exec(req.originalUrl);
|
||||
if (tmp) {
|
||||
botId = tmp[1];
|
||||
}
|
||||
}
|
||||
|
||||
let botId =
|
||||
req.originalUrl && req.originalUrl === '/' ?
|
||||
minBoot.botId :
|
||||
/\/([A-Za-z0-9\-\_]+)\/*/.exec(req.originalUrl)[1]
|
||||
let min: GBMinInstance =
|
||||
req.url === '/'
|
||||
? minBoot
|
||||
|
|
Loading…
Add table
Reference in a new issue