Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get the real client ip address. #3588

Merged
merged 3 commits into from
Mar 6, 2020

Conversation

zyhfish
Copy link
Contributor

@zyhfish zyhfish commented Feb 20, 2020

Fix #3587

Copy link
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I'd like to update the documentation included a bit on this since it is adding a new API to the process

DNN Platform/Library/Common/Utilities/NetworkUtils.cs Outdated Show resolved Hide resolved
DNN Platform/Library/Common/Utilities/NetworkUtils.cs Outdated Show resolved Hide resolved
DNN Platform/Library/Common/Utilities/NetworkUtils.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@valadas valadas added this to the 9.5.1 milestone Mar 3, 2020
@CMarius94
Copy link
Contributor

According to MDN the specified header can return a list of IPs due to proxies. In our development environment we had this bug because we already have an internal method for getting the UserIP (MyTokens geolocation token, for example).

Some load balancers/proxies do add their IP to this header, others don't, others use another header field. It all depends on their configuration, but in order to prevent unwanted behavior, i think you should split by comma and use the first IP found in the header.

Copy link
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mitchelsellers mitchelsellers merged commit 8574a4e into dnnsoftware:develop Mar 6, 2020
@valadas valadas modified the milestones: 9.5.1, 9.6.0 Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ip filter won't work under load balance environment
4 participants