Closed aaronschweig closed 3 years ago
I got to solve the problem by myself.
For future reference if anybody else has this problem:
To pass any header i used the concept described in the Metadata Documentation of the gRPC docs. The metadata.AppendToOutgoingContext
enabled me to provide every header needed into the metadata which will be passed to the client. I was able to achieve this by using a middleware.
Thanks again!
Hello!
First of all thank you for this plugin, it works really great! While experimenting with the gateway i quickly got it to work and set it up with multiple gRPC Services. But both services use an interceptor to ensure authentication via metadata.
Before i tried this gateway i used the grpc-gateway as a RESTful gateway. In this gateway every header provided with the HTTP Request gets passed as metadata with the gRPC call. I tried it with the graphql-gateway as well but it didn't work.
After investigating the generated code and comparing the differences i saw, that no metadata gets passed with the calls.
My question now is: Is there any possibility for me to either
a) manually forward the needed headers as metadata or b) get this behaviour implemented into this repository? (I would be happy to contribute if needed)
Thank you for your help in advance and thanks again for providing the gateway!