Open ichesnokov opened 1 year ago
When behind_proxy is on, request->address returns value of X-Forwarded-For header, and it's completely legitimate for this header to contain multiple IP addresses: https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/X-Forwarded-For - IP of the client and proxies' IPs.
behind_proxy
request->address
X-Forwarded-For
While according to Dancer documentation it should only Return the IP address of the client.
Return the IP address of the client.
It would be nice to make it only return client's IP - either first IP from the list, or $ENV{REMOTE_ADDR} (like e.g. Dancer2 does).
$ENV{REMOTE_ADDR}
When
behind_proxy
is on,request->address
returns value ofX-Forwarded-For
header, and it's completely legitimate for this header to contain multiple IP addresses: https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/X-Forwarded-For - IP of the client and proxies' IPs.While according to Dancer documentation it should only
Return the IP address of the client.
It would be nice to make it only return client's IP - either first IP from the list, or
$ENV{REMOTE_ADDR}
(like e.g. Dancer2 does).