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

feat(): add CF-Connecting-IP #908

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

n33pm
Copy link

@n33pm n33pm commented Apr 9, 2024

No description provided.

@VojtechVitek VojtechVitek changed the title feat(): add CF-Connection-IP feat(): add CF-Connecting-IP Apr 9, 2024
middleware/realip.go Outdated Show resolved Hide resolved
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

I think this is looking good. Few more suggestions.

middleware/realip.go Outdated Show resolved Hide resolved
middleware/realip.go Outdated Show resolved Hide resolved
middleware/realip.go Outdated Show resolved Hide resolved
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

LGTM

I can test this if @pkieltyka gives it a go.

middleware/realip.go Outdated Show resolved Hide resolved
middleware/realip.go Outdated Show resolved Hide resolved
middleware/realip.go Outdated Show resolved Hide resolved
middleware/realip.go Outdated Show resolved Hide resolved
middleware/realip.go Outdated Show resolved Hide resolved
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

Code LGTM.

I'll give this a try and test.

Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

r.Use(middleware.RealIPFromHeaders("CF-Connecting-IP", "X-True-Client-IP", "X-Real-IP", "X-Forwarded-For"))

works as expected

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.

None yet

3 participants