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

Clean headers before forwarding requests #42

Open
jose-ledesma opened this issue Nov 19, 2019 · 2 comments
Open

Clean headers before forwarding requests #42

jose-ledesma opened this issue Nov 19, 2019 · 2 comments

Comments

@jose-ledesma
Copy link

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
git-gateway is forwarding some Headers it should not (X-Forwarded-For, Client-IP), which may trigger undesired behaviors (see #41 )

- If the current behavior is a bug, please provide the steps to reproduce.
We have detected than when forwarding the Client-IP header to GitLab, its api detected an Spoofing attempt (because X-Forwarded-For and Client-IP did not match)

- What is the expected behavior?
Forwarded request should be clean of unneeded headers.

- Please mention your Go version, and operating system version.

@aarushik93
Copy link

Hello, can I get some more information on this...is this just for GitLab? Or all forwarded requests should be cleaned of those headers?

@aarushik93 aarushik93 self-assigned this Apr 23, 2020
@mraerino
Copy link
Contributor

mraerino commented Apr 24, 2020

i'd say it should happen for all git providers.

it could be useful to get a build running on staging that logs all request headers, so you can know which to filter.
alternatively, an allow-list would make sense, because we can lookup what headers can be passed to those APIs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants