server: grpc listens over SSL
This commit is contained in:
parent
9fd8ea5390
commit
6529dec9db
|
@ -94,7 +94,9 @@ func New(cfg Config) (*Server, error) {
|
|||
proto.RegisterRoutesServer(gs, &Route{Server: s})
|
||||
proto.RegisterTokensServer(gs, &Token{Server: s})
|
||||
|
||||
l, err := net.Listen("tcp", cfg.GRPCAddr)
|
||||
l, err := tls.Listen("tcp", cfg.GRPCAddr, &tls.Config{
|
||||
GetCertificate: m.GetCertificate,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue