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

fix(http): add request.RemoteAddr in case of WithClientIP #13

Merged
merged 3 commits into from
Dec 16, 2021

Conversation

zzerjae
Copy link
Contributor

@zzerjae zzerjae commented Dec 15, 2021

If no header that determines the real user's IP is found, the RemoteIP of the request should be output.

@zzerjae zzerjae requested a review from dlsrb6342 December 15, 2021 16:08
@dlsrb6342
Copy link
Member

Why does clientIp(h http.Header) function place in http_option.go?
I think it can be moved to http.go like isIgnored() method I made.

@zzerjae
Copy link
Contributor Author

zzerjae commented Dec 16, 2021

Why does clientIp(h http.Header) function place in http_option.go? I think it can be moved to http.go like isIgnored() method I made.

Seems like an appropriate point. I will move it.

@zzerjae
Copy link
Contributor Author

zzerjae commented Dec 16, 2021

@dlsrb6342 fixed

Copy link
Member

@dlsrb6342 dlsrb6342 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@zzerjae zzerjae merged commit 55bf3ba into main Dec 16, 2021
@zzerjae zzerjae deleted the fix/client-ip branch December 16, 2021 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants