Closed Alfons0329 closed 7 months ago
Thanks for the question..
Would you mind taking a look at your setup and compare it with our echo server demo setup and see how they differ? https://github.com/grpc/grpc-web/tree/master/net/grpc/gateway/examples/echo
thanks :)
@sampajano Thank you so much, I just found that my grpc backend server has TLS solution, so I added the following
transport_socket:
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
And now it worked.
By the way, is there a reference for the yaml config that I can forward my metadata such as cookie in gRPC-web header to the backend server?
Every time I use bloomRPC with metadata such as {"cookie", "123123"}
it does not show in the log of envoy.
[2022-06-01 09:53:37.311][18][debug][router] [source/common/router/router.cc:670] [C0][S1113640055223748911] router decoding headers:
':authority', '10.17.211.86:9902'
':path', '/catalog.CatalogHandler/GetBuildNumber'
':method', 'POST'
':scheme', 'http'
'accept', 'application/grpc-web-text'
'x-user-agent', 'grpc-web-javascript/0.1'
'origin', 'file://'
'x-grpc-web', '1'
'user-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) bloom-rpc-client/1.5.3 Chrome/78.0.3904.130 Electron/7.1.11 Safari/537.36'
'content-type', 'application/grpc'
'accept-encoding', 'gzip, deflate'
'accept-language', 'en-US'
'x-forwarded-proto', 'http'
'x-request-id', '06a1f012-36fd-43cb-ac05-b9a2c81fae5e'
'te', 'trailers'
'grpc-accept-encoding', 'identity
Thank you
Glad it's working now!
RE cookie:
gRPC metadata are not encoded as HTTP headers.. so i was not surprised to see that "cookie" didn't work as intended..
However, I'd assume that any cookies on your browser (matching the domain) should be available on the gRPC server as a HTTP header (but i'm not sure what's the API to access it depending on which server you use).
Closing for now. Feel free to reopen if you still have questions :)
Hello, I just modified the "hello world" demo to support my project. My goal is to forward the incoming grpc-web call and proxy it to the native grpc format to the backend server. The grpc call works fine for native grpc from bloomRPC client, yet for the grpc-web, it always failed with
And the log for envoy proxy itself is always
Here is the YAML for config, not sure where I missed My grpc server is running at port 50051
And here is the docker-compose file
Thanks for the help