How do I serve SSL for both GRPC and HTTPS service?
tamalsaha opened this issue · 5 comments
tamalsaha commented
Hi,
Thanks for this library. I am trying to serve GRPC and GRPC-gateway(only https) on the same port and terminate SSL for both at the go server. Do you mind showing example on how to do that? Here is a code example of what I am trying to do:
https://github.com/appscode/appstream/blob/master/cmd/appstream/app/server.go#L48
Thanks.
soheilhy commented
An option, that I can think of, is to match grpc first and send all that's maching to your grpc listener:
https://github.com/soheilhy/cmux/blob/master/example_test.go#L115
The rest should unconditionally be sent to the gateway.
vtolstov commented
can you share info @tamalsaha ?
tamalsaha commented
@vtolstov , here is an example grpc server using this library https://github.com/appscode/hello-grpc