Open tengfmu opened 1 year ago
Suggested small code tweak which worked for me (required re-building of binary):
// Start UI server.
func (s *Server) Start() error {
fmt.Println("Starting UI server...")
cfg, err := s.cfgProvider.GetConfig()
if err != nil {
return err
}
address := fmt.Sprintf("%s:%d", cfg.Host, cfg.Port)
if cfg.TLS.CertFile != "" && cfg.TLS.KeyFile != "" {
fmt.Println("Starting UI server with TLS...")
s.httpServer.Logger.Fatal(s.httpServer.StartTLS(address, cfg.TLS.CertFile, cfg.TLS.KeyFile)) //<-- start serving over https
} else {
fmt.Println("Starting UI server without TLS...")
s.httpServer.Logger.Fatal(s.httpServer.Start(address)) //<-- original line
}
return nil
}
Is your feature request related to a problem? Please describe.
Currently when start ui-server through command line or docker image, it always running over
http
. To make it running from moreproduction
env, it would be better to support running the server overhttps
.As a workaround, we could setup reverse proxy to provide
https
access to ui server, but still it would be great if we could supporthttps
natively.Describe the solution you'd like
Through config or minor code change, ui server should be running over
https
in addition tohttp
.Additional context