Comments (3)
Hi Jacques @0xjac!
Sorry, it took me a white to remember this library and reread the code.
I find your concerns perfectly valid and the PR is welcome.
It looks like that the library is used in at least one other project, so the "proper" change where the lines 119-126 are removed is going to break the contract. This would be a perfect case for a v2
, but I honestly have to time to maintain the library.
The least intrusive fix would be to add a boolean (?) flag/property to the Wrapper struct and change behaviour based on it, not even changing the constructor signature.
from go-forwarded.
@stanvit thanks for your reply. I've been doing some more digging and I have noticed a few more things that are needed such as:
- Switch to a go module
- Pass obfuscated identifiers as allowed to set the header (instead of just IPs and CIDR).
- Handle multiple values as list and repeated headers for
Forwarded
- Expose a
HandlerFunc
or something a bit more friendly to integrate with popular web frameworks which don't supporthttp.Handler
natively (like gin)
All in all, this is a bit more work than I initially anticipated. I don't want to take up too much of your time, especially if you don't have time to maintain a v2
. Hence I am thinking of writing (and maintaining) a new library based/inspired by yours (properly credited of course).
That being said, if you still want a PR for the flag/property addressing the 0.0.0.0
address and fake port. I'll happily submit one as I initially offered!
from go-forwarded.
Thanks for understanding. I think starting a new project would be the best - with all five points you listed here. I'll happily place a link to your project in my README when it's ready if you like.
Please don't bother with the PR, I'll just redirect everyone interested in newer/better functionality to your project.
from go-forwarded.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-forwarded.