summaryrefslogtreecommitdiff
path: root/gopher.go
diff options
context:
space:
mode:
Diffstat (limited to 'gopher.go')
-rw-r--r--gopher.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/gopher.go b/gopher.go
index 1c13886..d5cf3c0 100644
--- a/gopher.go
+++ b/gopher.go
@@ -20,6 +20,18 @@ func buildGopherServer(server Server, config *Configuration) (sr.Server, error)
_, info, _, errlog := Loggers(config)
_ = info.Log("msg", "starting gopher server", "addr", addr)
+ if server.TLS != nil {
+ return gopher.NewTLSServer(
+ context.Background(),
+ server.Hostnames[0],
+ "tcp",
+ addr,
+ logging.LogRequests(info)(routes(server)),
+ errlog,
+ server.TLS,
+ )
+ }
+
return gopher.NewServer(
context.Background(),
server.Hostnames[0],