Forum Discussion
xuwen
Sep 21, 2021Cumulonimbus
when HTTP_REQUEST {
if { [HTTP::header exists "Incap-Client-IP"] } {
set client_ip [HTTP::header "Incap-Client-IP"]
} elseif { [HTTP::header exists "X-Forwarded-For"] } {
set client_ip [getfield [HTTP::header "X-Forwarded-For"] "," 1]
}
if { [info exists client_ip] } {
HTTP::header insert "Client_Real_IP" $client_ip
}
}