Hm, what you did was exactly right. In our example, here's how we passed "custom-header-1" (deliberately as an example on how to pass custom metadata) envoy.yaml: https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/envoy.yaml client: https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/echoapp.js#L69
and the metadata will make it to the other side like this: https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/node-server/server.js#L40 This is rather curious. The only thing I can think of is that you are using the PromiseClient, where we have seen some runtime mismatch issue where someone is using the protoc plugin at HEAD but was using the released version of our npm package. We have just released 1.0.4 so perhaps can you try this again? On Wed, Mar 13, 2019 at 12:46 PM Rob Cecil <[email protected]> wrote: > My existing c# based Grpc server uses a custom Http/2 metadata > "access-token". How is this supported in Grpc-web? I changed my envoy.yaml: > > cors: > allow_origin: > - "*" > allow_methods: GET, PUT, DELETE, POST, OPTIONS > allow_headers: keep-alive,user-agent,cache-control,content > -type,content-transfer-encoding,*access-token*,x-accept-content-transfer- > encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout > max_age: "1728000" > expose_headers: *access-token*,grpc-status,grpc-message > enabled: true > > > So, I am no longer seeing CORS errors in my browser console, but the token > never makes it to the other side of the proxy. All I am seeing on my C# > side, is "user-anger" in the metadata object. > I am creating a json object for the metadata in each rpc call in the web > client. > > promiseClient.getUser(logInState.getCurrentuserinfo(), { "access-token": > logInState.getAccesstoken() }) > > .then( ... ).catch (... ) > > THANKS > > -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/grpc-io. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/b67d222e-a145-48fe-b6a3-0e9098581961%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/b67d222e-a145-48fe-b6a3-0e9098581961%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAEteGX34twj-hRe39CSX6BZrx6gZjSiWH%2BbTx%3DTnFbCy1SAu5Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
