Introduction
When you use Nginx to forward requests to another server, it needs to send extra information called proxy headers. These headers tell the receiving server details like the original visitor's IP address or the original request protocol. Without these headers, the server might not know where the request really came from or how it was made.
When you want to forward web traffic from Nginx to an application server and keep the visitor's original IP address.
When your backend server needs to know if the original request was made over HTTP or HTTPS.
When you want to pass the original host name from the client to the backend server.
When you want to add security by controlling which headers are sent to the backend.
When you want to enable logging on the backend server with accurate client information.