mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-26 22:25:52 -05:00
Ensure we set up TLS for http
This commit is contained in:
parent
f968b0abdf
commit
3f30bf1e33
11
app.go
11
app.go
@ -474,7 +474,16 @@ func (h *Headscale) Serve() error {
|
|||||||
|
|
||||||
g.Go(func() error { return grpcServer.Serve(socketListener) })
|
g.Go(func() error { return grpcServer.Serve(socketListener) })
|
||||||
g.Go(func() error { return grpcServer.Serve(grpcListener) })
|
g.Go(func() error { return grpcServer.Serve(grpcListener) })
|
||||||
g.Go(func() error { return httpServer.Serve(httpListener) })
|
|
||||||
|
if tlsConfig != nil {
|
||||||
|
g.Go(func() error {
|
||||||
|
tlsl := tls.NewListener(httpListener, tlsConfig)
|
||||||
|
return httpServer.Serve(tlsl)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
g.Go(func() error { return httpServer.Serve(httpListener) })
|
||||||
|
}
|
||||||
|
|
||||||
g.Go(func() error { return m.Serve() })
|
g.Go(func() error { return m.Serve() })
|
||||||
|
|
||||||
log.Info().Msgf("listening and serving (multiplexed HTTP and gRPC) on: %s", h.cfg.Addr)
|
log.Info().Msgf("listening and serving (multiplexed HTTP and gRPC) on: %s", h.cfg.Addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user