Open dvirgiln opened 3 years ago
@dvirgiln: Yeah, good point. The proxy server configuration assumes ssl
termination at the ELB level (i.e. calls from the UI are made within the same VPC, thus not requiring ssl
), but that's not always the case. I've added this issue to our roadmap to allow users to enable/disable ssl
.
I wouldn't be opposed to crafting a separate docker image for a more production like deploy with an nginx server for this kind of purpose. Maybe worth making an issue for this.
Just adding to this. I honestly think the change needed is as simple as
const apiOptions = {
target: `${process.env.MARQUEZ_PROTO ?? "http"}://${process.env.MARQUEZ_HOST}:${process.env.MARQUEZ_PORT}/`,
changeOrigin: process.env.PROXY_CHANGE_ORIGIN?.toLowerCase() === "true"
}
This remains default behaviour and allows for:
Usage
docker run -p 3000:3000 -e MARQUEZ_HOST="marquez-api.foo.com" -e MARQUEZ_PORT="443" -e MARQUEZ_PROTO="https" -e PROXY_CHANGE_ORIGIN="true" marquez-web
I am receiving an error accesing the API from marquez web
[HPM] Error occurred while trying to proxy request /api/v1/namespaces from marquez-web-internal-eks.eu-west-1.dev.hbi.systems to http://marquez-internal-eks.eu-west-1.dev.hbi.systems:80/ (ECONNRESET)
My application is deployed in Kubernetes. There is a redirection from http to https.
The problem is happening here: https://github.com/MarquezProject/marquez/blob/main/web/setupProxy.js#L6
So first question is why http protocol is hardcoded here.
I made marquez web to work forking the code and creating my own image:
I based my patch from this post: https://github.com/chimurai/http-proxy-middleware/issues/171