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

Add client_ip support #19

Merged
merged 5 commits into from
Aug 17, 2023
Merged

Add client_ip support #19

merged 5 commits into from
Aug 17, 2023

Conversation

hslatman
Copy link
Owner

This PR retrieves the (actual) client IP from the HTTP request context.

Since caddyserver/caddy#5104 was merged, Caddy determines the actual client IP, instead of assuming it's always the same as the r.RemoteAddr property. If a proxy sits in front of Caddy, it's now possible to configure Caddy so that the forwarded client IP header is set in the context. Some additional context can be found in kirsch33/realip#14.

This PR closes #15.

@hslatman hslatman merged commit c50e2ce into main Aug 17, 2023
@hslatman hslatman deleted the client-ip branch October 18, 2023 17:58
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.

Get forwarded IP after Caddy 2.4.6.
1 participant