Show real visitor IP behind Cloudflare on CYBERPANEL not OLS

Hi,
I’m trying to get the real ip from visitors coming from Cloudflare, i found only the documentation for OLS like this:
https://openlitespeed.org/kb/show-real-visitor-ip-instead-of-cloudflare-ips/

but nothing for Cyberpanel, anyone knows how to do it?

Thank you
Regards

Ok found the solution:

  1. Open /usr/local/lsws/conf/httpd_config.conf
  2. Add this on the first block of directives
    useIpInProxyHeader 1
    from what i understood 1 means that it works with all visitors coming from Cloudflare showing in the access.log the real ip instead the proxy’s ip.
    Instead 2 as option value means the same thing but limited on the ip addresses in the allowed list only.
    This should be to just “trust” on the allowed ips and avoid people faking this additional header value and so faking the ip in access log.