Allow not serving the toplevel domain
This commit is contained in:
parent
a90c68bf5e
commit
5ef2e14ae9
9 changed files with 60 additions and 17 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue