Hello there,
I'm new to aaPanel, I setup my admin port and website behind Cloudflare proxy for more security.
I got a problem that every time I login, I receive an email with CloudFlare IP logon, instead my real IP (Or incase someone else IP if I got hacked!)
I search on file: /www/server/panel/class/public.py and found line 593 - 595
def GetClientIp():
from flask import request
return request.remote_addr.replace('::ffff:', '')
Then I replace with:
if request.environ.get('CF-Connecting-IP') is None:
x_client_ip = request.remote_addr.replace('::ffff:', '')
else:
x_client_ip = request.environ.get('CF-Connecting-IP')
return x_client_ip
But it didn't work, do you have any idea or suggestion?