Closed kescherCode closed 3 years ago
I think for security reasons this should not be on by default. Instead it can be enabled with a flag specifying the header to use.
I made the method behave a bit more accurately, and added a flag for enabling the functionality (with the function returning r.RemoteAddr
if the flag is disabled, which is the default)
Please review the changes with a proper tool. GitHub's diff of this pull request is completely wrong.
Edit: Fixed it by doing the good ol' git diff
, branch reset to master and git apply
method.
I had a different flag in mind here, please check if this works for you now.
Oh, yeah your solution is much more elegant! Closing this pull request.
This is useful when mjpeg-proxy is sitting behind NGINX, Apache2, Caddy, etc.