mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-05-23 19:17:41 +08:00
fix: 修复意外的检查逻辑 x2
This commit is contained in:
parent
9066a251a1
commit
f1640760af
2
main.py
2
main.py
@ -71,7 +71,7 @@ async def handle_before_request(app, handler):
|
||||
if (config.read_config('common.reverse_proxy.allow_proxy')):
|
||||
if (request.headers.get(config.read_config('common.reverse_proxy.real_ip_header'))):
|
||||
# proxy header
|
||||
if ((not config.read_config('common.reverse_proxy.allow_public_ip')) and (not utils.is_local_ip(request.remote))):
|
||||
if (config.read_config('common.reverse_proxy.allow_public_ip') or utils.is_local_ip(request.remote)):
|
||||
request.remote_addr = request.headers.get(
|
||||
config.read_config('common.reverse_proxy.real_ip_header'))
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user