-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix X-Forwarded-* headers in openvsx-proxy #12071
Conversation
/werft run 👍 started the job as gitpod-build-jp-openvsx-remove-rewrite.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as advertised.
/hold in case of anyone with more context on this has major comments
@jeanp413 I noticed that now if i navigate to Marketplace link it takes out to our proxy, not open-vsx.org as on main: The link on main as well points to proxy but it resolves to upstrea: Did we change anything that could break it? We should fix up the host header to upstream, no? |
@@ -49,7 +52,6 @@ func (o *OpenVSXProxy) Handler(p *httputil.ReverseProxy) func(http.ResponseWrite | |||
key, err := o.key(r) | |||
if err != nil { | |||
log.WithFields(logFields).WithError(err).Error("cannot create cache key") | |||
r.Host = o.upstreamURL.Host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems to break: #12071 (comment)
Do we really need to change it? OpenVSX should care about X-Forwarded*
to create links or it also looks at Host header for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is interesting though in context of Self Hosted in air gapped scenario where maybe a user machine does not have access to open-vsx.org directly but only via our proxy. In this case it would be even desirable to navigate user to our proxy for access of website. Not sure. cc @corneliusludmann @mrsimonemms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work, but we need to agree on #12071 (comment) before landing
also cleaning up commit history :)
@akosyakov That's expected behavior, as the openvsx api will use the |
actually let's go with it, I think it is minor, and can be rather beneficial for self hosted installation. Feel free to clean up commits and unhold 🙏 |
d1b9988
to
3c4ef8d
Compare
/unhold |
Description
Fix X-Forwarded-* headers in openvsx-proxy, openvsx will read these values to properly create links to extension resources
How to test
Release Notes
Werft options: