Fix for header IP with source port #14085
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
NetBox version
v3.6.4
Feature type
Change to existing functionality
Proposed functionality
Based on a Slack Discussion, I'm submitting what could be a half bug / half feature request/issue...
When NetBox is behind an IIS reverse proxy, it appears that the header information is different. We can use it without any issue, except if a user enter a wrong credential set, which results in an error message:
The user IP returned has source port, which breaks the
get_client_ip
function defined in netbox/utilities/request.pyI worked around the issue by adding a single line of code:
client_ip = client_ip.split(':')[0]
just beforetry
Use case
To prevent error message, which lead the user to think that server is down instead of him entering a wrong password.
Database changes
none
External dependencies
none
The text was updated successfully, but these errors were encountered: