Mapping Headers in Nginx

Опубликовано: 05 Май 2026
на канале: Servers for Hackers
15,233
117

Writeup Here: https://serversforhackers.com/c/nginx...

When we use our applications behind some sort of proxy, we usually need to make the application aware it's behind a proxy.

This lets the application know to use the Forwarded or the X-Forwarded-* headers to know the protocol/schema (http vs https), port, and real client IP address.

However, sometimes we don't have the standard headers available. In those cases, we can map one header (and it's value) to another header in Nginx!

Twitter:   / fideloper  
Facebook:   / serversforhackers  
Book: https://book.serversforhackers.com/
Deploy: https://deploy.serversforhackers.com/
Docker: https://shippingdocker.com/