maybe this question is very stupid, but I couldn't find a solution to it.
So I have a C# gRPC Backend with two Methods. One of them is the Download Methode.
I am also using an envoy proxy gateway, which listens on port 9090 and on the "/" endpoint. If a request comes in there it will forward it to my backend.
Now I want to send a gRPC Request from my react frontend to this backend over the envoy. I am now able to send requests, but the problem is that the gRPC changes the URL to the following:
http://localhost:9090/BlobStorage.BlobStorage/Download
The problem is my C# Backend doesn't listen to this. I want to change it to this:
http://localhost:9090/
So now to my question:
Is there a possibility to set the absolute URL for my gRPC request?
I am using everything in docker. The frontend uses the gRPC-web package.
This my code for the request:
const blobService = new BlobStorageClient('http://localhost:9090/');
const test = () => {
var request = new DownloadDataRequest()
request.setFileid('JPG-2021-01-29-23-01-47-VALFSP');
request.setDeleteafter(false);
blobService.download(request, {}, function(err : any, response : any) {
console.log(err);
console.log(response);
});
}
question from:
https://stackoverflow.com/questions/66066084/can-i-set-the-abosulte-url-of-my-grpc-web-request 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…