Skip to content

Commit

Permalink
fix(core.gbapp): FIX SSR errors and setOption impersonated.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jul 26, 2023
1 parent f4b22ce commit 5589095
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/core.gbapp/services/GBSSR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5589095

Please sign in to comment.