Skip to content

Commit

Permalink
fix: 意外的逻辑判断
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq authored Apr 21, 2024
1 parent 0502286 commit 9066a25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def handle_request(request):
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:
Expand Down

0 comments on commit 9066a25

Please # to comment.