Mapping Headers in Nginx

preview_player
Показать описание

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!

Рекомендации по теме
Комментарии
Автор

Thank you. I have been searching for this for 2 weeks. One short video with all answers.

AkanshaSaxena
Автор

Thanks for this great explanation. What kind of interface i.e. 5:28 do you use for adding the headers? Can you supply the PHP file for making all headers visble?

Cheers

davidjarosch