Interview Prep/Networking/HTTP, TLS & Certificates

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;.

All Networking questions Roadmap: Networking for DevOps

More on HTTP, TLS & Certificates