I am trying to send a grpc request from a c++ client to a server. On the way the http passes through a proxy that checks http header fields. I wanted to add a custom field version
to be checked by that proxy.
I am adding it to the grpc context and sending the request:
protos::MyProtoRequest req;
protos::MyProtoResponse res;
grpc::ClientContext context;
context.AddMetadata("version", "0.1.2");
// proto_stub is a protobuf stub interface
const grpc::Status status = proto_stub->MyOperation(&context, req, &res);
Then inside my proxy I inspect the http header and I do not see a version
field in it.
I once did something similar but with the name authorization
instead of version
and it worked. Here I am doing the same thing with another name and it fails. I am confused. What am I doing wrong?
Thank you