ℹ️ This page contains an example of a configuration file for the redirection.io agent. To discover all the configuration file and its options, please refer to the agent configuration reference. You may also check the list of configuration examples to find a configuration example that is close to your technical context.

Agent behind a TLS termination proxy

This example configures an agent running behind a load balancer, a CDN, or any other reverse proxy which terminates the TLS connection and forwards the requests to the agent as plain HTTP requests.

The X-Forwarded-Proto and X-Forwarded-Host headers are trusted, but only for the requests coming from the 10.0.0.0/8 range, where the load balancer lives. The HTTPS requests received by the load balancer are then matched and logged by the agent as https requests, with their original domain name.

Without this configuration, these requests would be seen as http requests, because the connection between the load balancer and the agent is not encrypted, and the agent does not trust these two headers by default.

Note that the Forwarded and X-Forwarded-For headers, used to determine the IP address of the client, are trusted by default: they do not need to be listed here.