File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
packages/runtime/src/internal Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ export class Router {
331331 path = path . replace ( / ^ \/ n e x t \/ / , "/" ) ;
332332 }
333333
334- path && hooks ?. auth ?. addPathToBlackList ?.( path ) ;
334+ path && path . startsWith ( "/" ) && hooks ?. auth ?. addPathToBlackList ?.( path ) ;
335335 } ) ;
336336 blocked = hooks ?. auth ?. isBlockedPath ?.( location . pathname ) ;
337337 }
Original file line number Diff line number Diff line change @@ -1789,6 +1789,9 @@ HTMLCollection [
17891789 {
17901790 url : "/next/blocked-app/blocked-path-2" ,
17911791 } ,
1792+ {
1793+ url : "http://aaa.com" ,
1794+ } ,
17921795 {
17931796 to : { } as unknown as string ,
17941797 } ,
@@ -1813,6 +1816,7 @@ HTMLCollection [
18131816 expect ( addPathToBlackList ) . toHaveBeenCalledWith (
18141817 "/blocked-app/blocked-path-2"
18151818 ) ;
1819+ expect ( addPathToBlackList ) . not . toHaveBeenCalledWith ( "http://aaa.com" ) ;
18161820 } ) ;
18171821
18181822 test ( "failed to bootstrap" , async ( ) => {
You can’t perform that action at this time.
0 commit comments