File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,17 @@ import and configure the library with your Castle API secret.
4949 # We try to fetch the client IP based on X-Forwarded-For or Remote-Addr headers in that order,
5050 # but sometimes the client IP may be stored in a different header or order.
5151 # The SDK can be configured to look for the client IP address in headers that you specify.
52+
53+ # Sometimes, Cloud providers do not use consistent IP addresses to proxy requests.
54+ # In this case, the client IP is usually preserved in a custom header. Example:
55+ # Cloudflare preserves the client request in the 'Cf-Connecting-Ip' header.
56+ # It would be used like so: configuration.ip_headers=['Cf-Connecting-Ip']
57+ configuration.ip_headers = []
58+
5259 # If the specified header or X-Forwarded-For default contains a proxy chain with public IP addresses,
5360 # then one of the following must be set
5461 # 1. The trusted_proxies value must match the known proxy IP's
5562 # 2. The trusted_proxy_depth value must be set to the number of known trusted proxies in the chain (see below)
56- configuration.ip_headers = []
5763
5864 # Additionally to make X-Forwarded-For and other headers work better discovering client ip address,
5965 # and not the address of a reverse proxy server, you can define trusted proxies
You can’t perform that action at this time.
0 commit comments