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