Lgwapnitsky Hi!
I asked my buddy ChatGPT.. and this is what he gave me… looks valid to me.
To configure ITFlow to retrieve the proper IP address from your reverse proxy using the HTTP_X_FORWARDED_FOR header, you will need to update your config.php file as follows:
Open the config.php file located in the root directory of your ITFlow installation.
Locate the section where constants are defined or add a new section if necessary.
Add the following line to define the CONST_GET_IP_METHOD constant:
php
define('CONST_GET_IP_METHOD', 'HTTP_X_FORWARDED_FOR');
Save the file and ensure proper permissions are set so the application can read it.
Explanation:
CONST_GET_IP_METHOD specifies which server variable ITFlow should use to retrieve the client IP address.
HTTP_X_FORWARDED_FOR is typically used when your application is behind a reverse proxy (like Cloudflare, Nginx, or a load balancer). This header contains the original client’s IP address forwarded by the proxy.
Additional Steps:
If your reverse proxy adds a different header for the client IP (e.g., X-Real-IP or a custom header), replace HTTP_X_FORWARDED_FOR with the appropriate header name in the define statement.
Testing:
After making this change, verify that ITFlow correctly logs or processes the client IP addresses by checking the relevant logs or functionality within ITFlow. If the IP addresses are still incorrect, double-check your proxy configuration to ensure it passes the correct headers.