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 caddy client_ip variable parsing #184

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adrienyhuel
Copy link

Resolve #150

Copy link
Member

@fzipi fzipi left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

Is there a simple way to add tests on this change?

@adrienyhuel
Copy link
Author

@fzipi
I don't know how we could test that, it's only in the logs

Copy link
Member

@fzipi fzipi left a comment

Choose a reason for hiding this comment

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

Indentation on this code is bad. Maybe try to run go fmt?

Also, this might just deserve a new function call instead of adding it here?

@adrienyhuel
Copy link
Author

@fzipi
A function that might include the whole address parsing (from req.RemoteAddr and caddy client_ip variable) ?

@adrienyhuel adrienyhuel force-pushed the fix-client-ip branch 3 times, most recently from c95c1bc to 2fe46bc Compare December 18, 2024 21:24
@adrienyhuel adrienyhuel requested a review from fzipi December 18, 2024 21:27
@fzipi
Copy link
Member

fzipi commented Dec 19, 2024

I think it is way more clear now. @M4tteoP can you help me with the review?

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.

wrong client ip when using with cloudflared
2 participants