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 @@ -226,13 +226,12 @@ export function getConstructedRoute(req: {
226226 path => path !== '/' && path !== '/*'
227227 ) ;
228228
229- // Handle standalone wildcard case
230229 if ( meaningfulPaths . length === 1 && meaningfulPaths [ 0 ] === '*' ) {
231230 return '*' ;
232231 }
233232
234- // Construct the route by joining paths and normalizing
235- return meaningfulPaths . join ( '' ) . replace ( / \/ { 2 , } / g, '/' ) ; // Remove duplicate slashes
233+ // Join parts and remove duplicate slashes
234+ return meaningfulPaths . join ( '' ) . replace ( / \/ { 2 , } / g, '/' ) ;
236235}
237236
238237/**
@@ -257,6 +256,7 @@ export function getActualMatchedRoute(req: {
257256 }
258257
259258 // Handle root path case - if all paths are root, only return root if originalUrl is also root
259+ // The layer store also includes root paths in case a non-existing url was requested
260260 if ( layersStore . every ( path => path === '/' ) ) {
261261 return req . originalUrl === '/' ? '/' : undefined ;
262262 }
You can’t perform that action at this time.
0 commit comments