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: {
220
220
path => path !== '/' && path !== '/*'
221
221
) ;
222
222
223
- // Handle standalone wildcard case
224
223
if ( meaningfulPaths . length === 1 && meaningfulPaths [ 0 ] === '*' ) {
225
224
return '*' ;
226
225
}
227
226
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, '/' ) ;
230
229
}
231
230
232
231
/**
@@ -251,6 +250,7 @@ export function getActualMatchedRoute(req: {
251
250
}
252
251
253
252
// 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
254
254
if ( layersStore . every ( path => path === '/' ) ) {
255
255
return req . originalUrl === '/' ? '/' : undefined ;
256
256
}
You can’t perform that action at this time.
0 commit comments