Skip to content

Commit 217a9ed

Browse files
abhi1693jeremystretch
authored andcommitted
handles the port in the ip #14085
1 parent ad95760 commit 217a9ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/utilities/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_client_ip(request, additional_headers=()):
1717
)
1818
for header in HTTP_HEADERS:
1919
if header in request.META:
20-
client_ip = request.META[header].split(',')[0]
20+
client_ip = request.META[header].split(',')[0].partition(':')[0]
2121
try:
2222
return IPAddress(client_ip)
2323
except ValueError:

0 commit comments

Comments
 (0)