Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anodos325 committed Jan 22, 2025
1 parent b69747c commit 63ea592
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/middlewared/middlewared/utils/origin.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,14 @@ def create(cls, request):
)
elif sock.family in (AF_INET, AF_INET6):
la, lp, ra, rp, ssl = get_tcp_ip_info(sock, request)
try:
secure = ssl or ip_address(ra).is_loopback
except Exception:
secure = False

return cls(
family=sock.family,
loc_addr=la,
loc_port=lp,
rem_addr=ra,
rem_port=rp,
secure_transport=secure
ssl=ssl
)
except AttributeError:
# request.transport can be None by the time this is
Expand Down

0 comments on commit 63ea592

Please sign in to comment.