diff options
Diffstat (limited to 'svc/svc.go')
-rw-r--r-- | svc/svc.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/svc/svc.go b/svc/svc.go index e5802d2..1748bf0 100644 --- a/svc/svc.go +++ b/svc/svc.go @@ -25,6 +25,9 @@ func Start() { if !confObj.IsProxied { index.Host(confObj.Instance.URL) } + TLS := confObj.TLS.Use + TLSCert := confObj.TLS.Cert + TLSKey := confObj.TLS.Key confObj.Mu.RUnlock() setIndexRouting(index) @@ -34,7 +37,11 @@ func Start() { server := newServer(portnum, index) log.Printf("*** Listening on %v\n", portnum) log.Printf("*** getwtxt %v Startup finished at %v, took %v\n\n", Vers, time.Now().Format(time.RFC3339), time.Since(before)) - errLog("", server.ListenAndServe()) + if TLS { + errLog("", server.ListenAndServeTLS(TLSCert, TLSKey)) + } else { + errLog("", server.ListenAndServe()) + } closeLog <- true killTickers() |