-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
philippviereck/fastify
#1Labels
feature requestNew feature to be addedNew feature to be addedgood first issueGood for newcomersGood for newcomers
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Add a option to disable requestIdHeader overwriting genReqId
Motivation
As far as I understand, fastify will by default use the value of the requestIdHeader,if such a header is present in the request, over the genReqId value.
Now, one does not necessarily know that a server is a fastify server, and one can change (obfuscate) the header key, but essentially a malicious actor could pass the same request-id for all requests and therefore reduce the quality of the logs. If one is trying to investigate an incident multiple requests now share the same id.
This is of low impact I'd assume, still I think it would be nice to disable this behaviour in a proper way instead of relying on obfuscation.
Example
const fastify = require('fastify')({
requestIdHeader: false // (disabled instead of default value)
})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestNew feature to be addedNew feature to be addedgood first issueGood for newcomersGood for newcomers