Allow not serving the toplevel domain

This commit is contained in:
Tom Wiesing 2023-11-02 14:15:10 +01:00
parent a90c68bf5e
commit 5ef2e14ae9
No known key found for this signature in database
9 changed files with 60 additions and 17 deletions

View file

@ -41,7 +41,7 @@ func (server *Server) Server(ctx context.Context, progress io.Writer) (public ht
var publicM, internalM mux.Mux[component.RouteContext]
publicM.Context = func(r *http.Request) component.RouteContext {
slug, ok := server.Still.Config.HTTP.SlugFromHost(r.Host)
slug, ok := server.Config.HTTP.NormSlugFromHost(r.Host)
return component.RouteContext{
DefaultDomain: slug == "" && ok,
}