-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing the automatic addition of reserved addresses to the proxies would introduce breaking changes (e.g., when users start getting back 127.0.0.1 because it's not being filtered as a proxy anymore). Passing in reserved IPs as an option also seems less than ideal to me, since you'd have to take care to add everything *except* the particular clients you're expecting. This wasn't really the use case described by issues like #8. What's more, the name `:clients` has the same number of characters as `:headers` and `:proxies`, so everything lines up all pretty. ✨ The bulk of this commit isn't so much in the logic or even the documentation. Mostly, I just found the tests inscrutable. So I tried to refactor them so that they'd be moderately less painful while also adding tests for `:proxies` vs `:clients`. Essentially, instead of cramming a million assertions into each test, I separated the tests out from each other, grouped by forwarding header (or other general use cases, as in the two-hop tests). Then I can just make basically one assertion per test. Plus I fit everything back into tidy 80-character lines. 🌈 This closes #8, closes #10, and closes #11.
- Loading branch information
Alex Vondrak
committed
Oct 21, 2019
1 parent
1a77add
commit 06ca198
Showing
3 changed files
with
458 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.