File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
plugins/node/opentelemetry-instrumentation-express/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -220,13 +220,12 @@ export function getConstructedRoute(req: {
220220 path => path !== '/' && path !== '/*'
221221 ) ;
222222
223- // Handle standalone wildcard case
224223 if ( meaningfulPaths . length === 1 && meaningfulPaths [ 0 ] === '*' ) {
225224 return '*' ;
226225 }
227226
228- // Construct the route by joining paths and normalizing
229- return meaningfulPaths . join ( '' ) . replace ( / \/ { 2 , } / g, '/' ) ; // Remove duplicate slashes
227+ // Join parts and remove duplicate slashes
228+ return meaningfulPaths . join ( '' ) . replace ( / \/ { 2 , } / g, '/' ) ;
230229}
231230
232231/**
@@ -251,6 +250,7 @@ export function getActualMatchedRoute(req: {
251250 }
252251
253252 // Handle root path case - if all paths are root, only return root if originalUrl is also root
253+ // The layer store also includes root paths in case a non-existing url was requested
254254 if ( layersStore . every ( path => path === '/' ) ) {
255255 return req . originalUrl === '/' ? '/' : undefined ;
256256 }
You can’t perform that action at this time.
0 commit comments