Skip to content

Commit

Permalink
fix: 修复允许公网转发时报错
Browse files Browse the repository at this point in the history
Close #51
  • Loading branch information
helloplhm-qwq authored Apr 15, 2024
1 parent acb84a5 commit 2463660
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_private_ip(request.remote))):
if (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 2463660

Please sign in to comment.