forwarded headers
HTTP headers such as X-Forwarded-For that a proxy adds to tell the app the original client address and scheme.
Trusting forged forwarded headers lets a client spoof its address and bypass address-based limits.
In more detail
Behind a proxy or load balancer, the app otherwise sees the proxy's address instead of the client's. The middleware that reads them must run before anything uses the client address, and must trust only known proxies, because clients can forge these headers.
Related terms
- HTTP header — A named line of metadata in an HTTP message, such as Content-Type: application/json, that describes the body, the caller or how to handle the exchange.
- reverse proxy — A server that receives requests on behalf of other servers and forwards them, returning their responses as if they were its own.
- middleware pipeline — The ordered chain of middleware every HTTP request passes through on the way in, and in reverse on the way out.
Taught in
- The ASP.NET Core Middleware Pipeline — Modern .NET Core, C# & Enterprise Microservices