What are the forwarding headers a proxy adds and how are they trusted?
IntermediateConceptHTTP, TLS & Certificates
Answer
X-Forwarded-For (client IP chain), X-Forwarded-Proto, X-Forwarded-Host, and the standardized Forwarded header. The PROXY protocol is an alternative for L4 that prepends connection info.
Applications must trust these only when set by your own proxies; otherwise clients can spoof their IP. Configure real-IP handling explicitly: nginx set_real_ip_from 10.0.0.0/8; real_ip_header X-Forwarded-For;.
More on HTTP, TLS & Certificates
What is the structure of an HTTP request and response?BeginnerWhich HTTP status code classes and codes should every DevOps engineer know?BeginnerWhat are the common HTTP methods and which are idempotent?BeginnerWhat changed between HTTP/1.1, HTTP/2 and HTTP/3?IntermediateHow does QUIC differ from TCP+TLS?AdvancedWhat are HTTP keep-alive and connection reuse, and why do they matter?Advanced