Possible incorrect regex for header test
arabidopsis opened this issue · 3 comments
arabidopsis commented
The line:
should probably be:
this.headersRE = new RegExp('^' + this.ignoredHeaders.join(strs.pipe) + '$', 'i');
otherwise you will match 'user-agent' for example since it has 'age' in it.
dr-dimitru commented
@arabidopsis then it also should be wrapped with parentheses like
new RegExp('^(' + this.ignoredHeaders.join(strs.pipe) + ')$', 'i');
Or I'd prefer ES6:
new RegExp(`^(${this.ignoredHeaders.join(strs.pipe))$`, 'i');
dr-dimitru commented
Hello @arabidopsis ,
Thank you a lot for reporting this one, please update to v1.6.2
Feel free to close it in case if the issue is solved on your end.
dr-dimitru commented
Closed due to silence at issue owner end.
Feel free to reopen it in case if the issue still persists on your end.