Skip to content

Commit

Permalink
Escape HTTP method in regexp (#95)
Browse files Browse the repository at this point in the history
In previous versions, the HTTP method was not escaped and could cause issues in regexp if special characters had been used.
  • Loading branch information
michaelzangl authored Oct 7, 2022
1 parent f838ffc commit 9ab3d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/AgentConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function finalizeConfig(config: AgentConfig): void {
config.reHttpIgnoreMethod = RegExp(
`^(?:${config
.httpIgnoreMethod!.split(',')
.map((s) => s.trim())
.map((s) => escapeRegExp(s.trim()))
.join('|')})$`,
'i',
);
Expand Down

0 comments on commit 9ab3d0e

Please sign in to comment.