File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ module.exports = function (options) {
57
57
debuglog ( 'actually get router [%s]' , router . __name__ ) ;
58
58
if ( router . __name__ === routerName && req . params . router ) {
59
59
req . url = shiftUrl ( req . url ) ;
60
+ req . baseUrl = ( req . baseUrl || '' ) + '/' + routerName ;
60
61
debuglog ( 'router is matched, remove router from url [%s]' , req . url ) ;
61
62
}
62
63
debuglog ( '[%s] lookup for user defined router' , req . url ) ;
@@ -88,6 +89,7 @@ module.exports = function (options) {
88
89
debuglog ( 'actually get action [%s]' , action . __name__ ) ;
89
90
if ( action . __name__ === actionName && req . params . action ) {
90
91
req . url = shiftUrl ( req . url ) ;
92
+ req . baseUrl = ( req . baseUrl || '' ) + '/' + actionName ;
91
93
debuglog ( 'action is matched, remove action from url [%s]' , req . url ) ;
92
94
}
93
95
action ( req , res , next ) ;
You can’t perform that action at this time.
0 commit comments