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

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Conversation

n33pm
Copy link
Contributor

@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
@n33pm n33pm force-pushed the feat/cf-connection-ip branch from d0d2277 to da49574 Compare April 9, 2024 14:20
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

@VojtechVitek VojtechVitek merged commit cbaac31 into go-chi:master Sep 18, 2024
16 checks passed
VojtechVitek added a commit that referenced this pull request Dec 14, 2024
@VojtechVitek
Copy link
Contributor

This feature was reverted and never released. See #966 for more details.

@VojtechVitek
Copy link
Contributor

Please, have a look at this proposal: #967

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.

3 participants