fix: 意外的逻辑判断

This commit is contained in:
梓澄qwq
2024-04-21 19:53:37 +08:00
committed by GitHub
parent 0502286ac8
commit 9066a251a1

View File

@ -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 (config.read_config('common.reverse_proxy.allow_public_ip') and (not utils.is_local_ip(request.remote))):
if ((not config.read_config('common.reverse_proxy.allow_public_ip')) and (not utils.is_local_ip(request.remote))):
request.remote_addr = request.headers.get(
config.read_config('common.reverse_proxy.real_ip_header'))
else: