mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-30 00:30:48 +08:00
Fix for peername tuple size variability in get_client_ip (#2427)
ipv6 compatibility patch.
This commit is contained in:
parent
3f0fc85b95
commit
29216e96bd
@ -55,9 +55,10 @@ def should_be_disabled(fullpath:str) -> bool:
|
|||||||
def get_client_ip(request):
|
def get_client_ip(request):
|
||||||
peername = request.transport.get_extra_info("peername")
|
peername = request.transport.get_extra_info("peername")
|
||||||
if peername is not None:
|
if peername is not None:
|
||||||
host, port = peername
|
# Grab the first two values - there can be more, ie. with --listen
|
||||||
|
host, port = peername[:2]
|
||||||
return host
|
return host
|
||||||
|
|
||||||
return "unknown"
|
return "unknown"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user