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: special case CloudFlare client IP addrs #148

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

vanodevium
Copy link
Contributor

No description provided.

Copy link
Owner

@mccutchen mccutchen 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 the contribution, this makes sense to me. Left a couple of very nit-picky style change requests below, let me know if they make sense to you!

httpbin/helpers.go Outdated Show resolved Hide resolved
httpbin/helpers.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #148 (7686ee2) into main (8cd8f9c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   98.04%   98.04%           
=======================================
  Files           8        8           
  Lines        1585     1588    +3     
=======================================
+ Hits         1554     1557    +3     
  Misses         22       22           
  Partials        9        9           
Files Coverage Δ
httpbin/helpers.go 96.61% <100.00%> (+0.03%) ⬆️

@mccutchen
Copy link
Owner

Oh, also, please add a test case for this to the existing unit tests for getClientIP in helpers_test.go. (I expect our code coverage checks are gonna complain about this!)

@vanodevium
Copy link
Contributor Author

I have done this request from web editor :) Ok.
Please wait when I could work from laptop.

Your nits are awesome!

Copy link
Owner

@mccutchen mccutchen left a comment

Choose a reason for hiding this comment

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

👍 LGTM pending CI run

@mccutchen mccutchen changed the title clientIP for Cloudflare feat: special case CloudFlare client IP addrs Oct 6, 2023
@mccutchen mccutchen merged commit e3c4f8d into mccutchen:main Oct 6, 2023
6 checks passed
@vanodevium
Copy link
Contributor Author

@mccutchen Please tell when this functionality would be in docker image?

@vanodevium vanodevium deleted the patch-1 branch October 6, 2023 14:51
@mccutchen
Copy link
Owner

Released in https://github.com/mccutchen/go-httpbin/releases/tag/v2.11.1. A docker image for that release will be pushed as soon as this workflow run finishes.

@mccutchen
Copy link
Owner

Docker image for v2.11.1 now available, and latest tag points to the same:
https://hub.docker.com/r/mccutchen/go-httpbin/tags

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.

2 participants