split options of website/server
1 file changed, 7 insertions(+), 7 deletions(-)
changed files
M internal/server/server.go → internal/server/server.go
@@ -6,7 +6,6 @@ "fmt" "net/http" "time" - cfg "go.alanpearce.eu/website/internal/config" "go.alanpearce.eu/x/log" "gitlab.com/tozd/go/errors"@@ -24,16 +23,16 @@ IdleTimeout = 10 * time.Minute ) type Options struct { - Development bool - ListenAddress string - Port int - TLSPort int - TLS bool + ListenAddress string `conf:"default:localhost"` + Port int `conf:"default:8080,short:p"` + TLS bool `conf:"default:false"` + TLSPort int `conf:"default:8443"` ACMEIssuer string ACMEIssuerCert string - Config *cfg.Config + Domains []string `conf:"-"` + WildcardDomains []string `conf:"-"` } type Server struct {@@ -61,6 +60,7 @@ }, nil } func (s *Server) HostApp(app *App) { + s.options.Domains = append(s.options.Domains, app.Domain) s.mux.Handle(app.Domain+"/", app.Handler) }