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 2 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?

Copy link

sonarcloud bot commented Dec 18, 2024

@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) ?

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