mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
fix(core): disabled session check for preview mode (#867)
disabled session check for preview mode
This commit is contained in:
parent
8a012a393d
commit
82674eea88
1 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,8 @@ export default function koaSpaSessionGuard<
|
|||
|
||||
if (
|
||||
!spaDistFiles.some((file) => requestPath.startsWith('/' + file)) &&
|
||||
!ctx.request.path.endsWith(sessionNotFoundPath)
|
||||
!ctx.request.path.endsWith(sessionNotFoundPath) &&
|
||||
!ctx.request.URL.searchParams.get('preview') // Should not check session on preview mode
|
||||
) {
|
||||
ctx.redirect(sessionNotFoundPath);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue