Skip to content

Allow allowing/blocking hosts by IP range#236

Merged
willnorris merged 3 commits into
willnorris:masterfrom
basecamp:master
Jun 20, 2020
Merged

Allow allowing/blocking hosts by IP range#236
willnorris merged 3 commits into
willnorris:masterfrom
basecamp:master

Conversation

@blakestoddard
Copy link
Copy Markdown
Contributor

Give allowHosts and denyHosts the ability to allow/block based on a netblock. We're using this change to block the reserved IP ranges to prevent users from trying to proxy images from those ranges.

@googlebot
Copy link
Copy Markdown
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 19, 2020

Codecov Report

Merging #236 into master will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   89.16%   89.28%   +0.11%     
==========================================
  Files           6        6              
  Lines         674      681       +7     
==========================================
+ Hits          601      608       +7     
  Misses         50       50              
  Partials       23       23              
Impacted Files Coverage Δ
imageproxy.go 84.83% <100.00%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c7d08f...f646549. Read the comment docs.

@blakestoddard
Copy link
Copy Markdown
Contributor Author

@googlebot I signed it!

@googlebot
Copy link
Copy Markdown
Collaborator

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Copy Markdown
Owner

@willnorris willnorris left a comment

Choose a reason for hiding this comment

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

wow, this is great... very clean! Just a couple of minor comments.

Comment thread README.md Outdated
Comment thread imageproxy.go Outdated
@willnorris
Copy link
Copy Markdown
Owner

Looks great, thanks!

@willnorris willnorris merged commit f91e9cb into willnorris:master Jun 20, 2020
@blakestoddard blakestoddard changed the title Allow allowing/blocks hosts by IP range Allow allowing/blocking hosts by IP range Jun 21, 2020
j-mcnally pushed a commit to Chowly/imageproxy that referenced this pull request Feb 6, 2025
vetler pushed a commit to vetler/imageproxy that referenced this pull request Apr 11, 2025
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