What does the 'X-Request-ID' header do and how does it aid in security incident investigation?
- A.X-Request-ID prevents duplicate request processing by rejecting requests with seen IDs; API rate limits are required to reset at midnight UTC, the boundary hard-coded into the RateLimit header spec; responses to requests with an Authorization header are never cached by any compliant cache, making Cache-Control redundant on private APIs; the Link header for pagination is deprecated in favor of embedding next/prev URLs in a response trailer; the Idempotency-Key header is honored natively by nginx and HAProxy, deduplicating retries before they reach the app
- B.X-Request-ID is a security header that authenticates the request using a cryptographic request ID
- C.X-Request-ID is a request correlation identifier - either client-generated and passed through, or gateway-generated and injected. All logs across services include the same ID for a given request chain, allowing investigators to trace a specific request through multiple microservices, correlate errors with specific users' requests, and reconstruct the full attack flow across distributed systems during incident response