operate_ip = request.headers.get('X-Forwarded-For')
if operate_ip:
operate_ip = operate_ip.split(',')[0]
if not operate_ip:
try:
operate_ip = request.remote_addr
except Exception as e:
print(e)
operate_ip = '0.0.0.0'
operate_ip = request.headers.get('X-Forwarded-For')
if operate_ip:
operate_ip = operate_ip.split(',')[0]
if not operate_ip:
try:
operate_ip = request.remote_addr
except Exception as e:
print(e)
operate_ip = '0.0.0.0'