fix(core): Ensure ip address headers are stripped when lower case#20484
fix(core): Ensure ip address headers are stripped when lower case#20484
Conversation
size-limit report 📦
|
s1gr1d
left a comment
There was a problem hiding this comment.
We have multiple points in the code where we remove specific headers based on options. I hope this gets easier with the new dataCollection config.
I quickly checked and we should probably also modify this line:
to
const PII_HEADER_SNIPPETS = ['forwarded', '-user', '-ip'];This would match all ipHeaderNames
let's look at this in a follow up PR! 👍 |
|
FWIW in http 2 and 3 everything should be lower case, so we might need to adapt other places in the code as well |
This was flagged by a claude security review and makes sense IMHO, we should make sure to also strip IP headers when they are lower case.
While looking at that I noticed we have no tests at all for this rather critical thing 😬 so I added some here.