events {} http { upstream backend_servers { server FWD_server:7443; } server { listen 7443; location / { proxy_pass https://backend_servers; # --- Standard Proxy Headers (Sent to App) --- proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; # --- NEW: Custom Response Header (Sent to User) --- # This adds a header named 'X-Server-IP' to the response you receive. # $upstream_addr holds the IP:Port of the actual container that served the request. add_header X-Server-IP $upstream_addr always; } } }