Perl environment

Created at:


Cloud WAF is deployed as a reverse proxy in front of your Perl application. This means that all traffic coming to your site through Cloud WAF will be seen as coming from one of Cloud WAF IPs.

In order to make sure that your Perl application gets the correct user IP you will need to make some modifications as to the way, the IP is extracted.

Modify your code to extract the true visitor IPs:

Cloud WAF injects a dedicated header to each request that includes the original client IP (INCAP-CLIENT-IP and X-FORWARDED-FOR). You should use this header to extract the client IP anywhere in the code where the client IP is referenced. 

The header name should be HTTP_INCAP_CLIENT_IP and HTTP_X_FORWARDED_FOR.


# cat


print "Content-type: text/html; \n\n";
print "IncapClientIP: $HTTP_INCAP_CLIENT_IP <br>";



Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk