mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
fix(core): fix preview session not found bug (#970)
* fix(core): fix preview session not found bug fix preview session not found bug * fix(core): cr fix cr fix
This commit is contained in:
parent
8a07e939a3
commit
545a3929e4
1 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,10 @@ export default function koaSpaSessionGuard<
|
|||
}
|
||||
|
||||
// Session guard
|
||||
if (guardedPath.some((path) => requestPath.startsWith(path))) {
|
||||
const isPreview = ctx.request.URL.searchParams.get('preview');
|
||||
const isSessionRequiredPath = guardedPath.some((path) => requestPath.startsWith(path));
|
||||
|
||||
if (isSessionRequiredPath && !isPreview) {
|
||||
try {
|
||||
await provider.interactionDetails(ctx.req, ctx.res);
|
||||
} catch {
|
||||
|
|
Loading…
Reference in a new issue