Skip to content

Commit c90bf15

Browse files
committed
refactor(server): improve request logging ignorePaths check to use startsWith
1 parent a611589 commit c90bf15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/servers/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ export class ExpressServer {
380380
const skip = this.config.requestLogging?.ignorePaths?.(req, res);
381381
if (skip) return next();
382382
} else if (Array.isArray(this.config.requestLogging?.ignorePaths)) {
383-
const skip = this.config.requestLogging?.ignorePaths?.includes(req.path);
383+
const skip = this.config.requestLogging?.ignorePaths?.some(path => req.path.startsWith(path));
384384
if (skip) return next();
385385
}
386386

0 commit comments

Comments
 (0)