server: grpc listens over SSL

This commit is contained in:
Cadey Ratio 2017-04-28 22:21:04 -07:00
parent 9fd8ea5390
commit 6529dec9db
1 changed files with 3 additions and 1 deletions

View File

@ -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
}