Path prefixes: how?
Hi all,
I have a very basic question and cannot find an answer yet.
This is what I have from docs:
const echoService = new EchoServiceClient('http://localhost:8080', null, null);That's all fine until it comes to deployment to the real world where I have just one domain (let's say this is a limitation) and want to split the traffic by path prefixes as one normally does in REST.
In other words this is the desired URL structure:
- web app: https://example.com
- grpc-web proxy: https://example.com/grpc-proxy
and the configuration of the client would be
const echoService = new EchoServiceClient('https://example.com/grpc-proxy', null, null);or even more preferrable
const echoService = new EchoServiceClient('/grpc-proxy', null, null);There is an option to configure some sort of path prefix strip and make one more proxy step on the envoy itself, so it looks something like
browser => envoy proxy strip path prefix => envoy grpc web proxy => grpc serverHowever, it looks dirty.
And I am still unsure whether the grpc-web library itself is going to support the non-root path prefixes such as described above in the long run .
Is this possible? Is there an example how to configure envoy in this case?
Thanks in advance.
Source: grpc/grpc-web