Implement matching of hostnames and schemes

This commit is contained in:
adnano
2020-10-11 17:53:22 -04:00
parent 90c9f5da5b
commit 2d11edaa4c
3 changed files with 58 additions and 56 deletions

View File

@@ -54,8 +54,8 @@ func main() {
server := &gmi.Server{
Certificate: cert,
Handler: handler,
}
server.Handle("localhost", handler)
if err := server.ListenAndServe(); err != nil {
log.Fatal(err)

View File

@@ -24,8 +24,8 @@ func main() {
mux.Handle("/", gmi.FileServer(gmi.Dir("/var/www")))
server := gmi.Server{
Handler: mux,
Certificate: cert,
}
server.Handle("localhost", mux)
server.ListenAndServe()
}