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

@ -42,7 +42,7 @@ func (home *Home) HandleRoute(ctx context.Context, route string) (http.Handler,
dflt.Fallback = home.publicHandler(ctx)
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
slug, ok := home.Config.HTTP.SlugFromHost(r.Host)
slug, ok := home.Config.HTTP.NormSlugFromHost(r.Host)
switch {
case !ok:
http.NotFound(w, r)