U 优化兼容性

4.0
vapao 2022-10-14 09:41:34 +08:00
parent 1dc47d5212
commit a4f5a62e51
1 changed files with 2 additions and 1 deletions

View File

@ -131,4 +131,5 @@ def get_request_real_ip(headers: dict):
x_real_ip = headers.get('x-forwarded-for') x_real_ip = headers.get('x-forwarded-for')
if not x_real_ip: if not x_real_ip:
x_real_ip = headers.get('x-real-ip', '') x_real_ip = headers.get('x-real-ip', '')
return x_real_ip.split(',')[0] x_real_ip = x_real_ip.split(',')[0]
return x_real_ip.split(':')[0]