File tree 1 file changed +14
-2
lines changed
src/routes/(app)/session/redirect
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 11
11
if (! target ) return null ;
12
12
let targetUrl = new URL (target );
13
13
14
+ if (
15
+ ! [
16
+ ' .phi.zone' ,
17
+ ' .phizone.cn' ,
18
+ ' phizone-ui.vercel.app' ,
19
+ ' phizone-ui.pages.dev' ,
20
+ ' localhost' ,
21
+ ].some ((host ) => (host [0 ] === ' .' ? targetUrl .host .endsWith (host ) : targetUrl .host === host ))
22
+ )
23
+ return null ;
24
+
14
25
for (let [key, value] of page .url .searchParams .entries ()) {
15
26
if (key === ' uri' ) continue ;
16
27
targetUrl .searchParams .append (key , value );
21
32
onMount (async () => {
22
33
if (browser ) {
23
34
setTimeout (async () => {
35
+ const dest = build (page .url .searchParams .get (' uri' )) ?? ' /' ;
24
36
try {
25
37
await Promise .allSettled ([useQueryClient ().invalidateQueries (), invalidateAll ()]);
26
- await goto (build ( page . url . searchParams . get ( ' uri ' )) ?? ' / ' );
38
+ await goto (dest );
27
39
} catch {
28
- window .location .href = build ( page . url . searchParams . get ( ' uri ' )) ?? ' / ' ;
40
+ window .location .href = dest ;
29
41
}
30
42
}, 1000 );
31
43
}
You can’t perform that action at this time.
0 commit comments