Skip to content

Commit

Permalink
handles the port in the ip #14085
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi1693 committed Nov 9, 2023
1 parent 57bf2a2 commit 188867d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/utilities/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_client_ip(request, additional_headers=()):
)
for header in HTTP_HEADERS:
if header in request.META:
client_ip = request.META[header].split(',')[0]
client_ip = request.META[header].split(',')[0].partition(':')[0]
try:
return IPAddress(client_ip)
except ValueError:
Expand Down

0 comments on commit 188867d

Please sign in to comment.