From 9149e1f1202584653ae9cbe8d7c4603a92fa6c1a Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 8 Nov 2018 10:17:17 -0500 Subject: [PATCH] Relax root route matching This is mostly unnecessary, and ensures users don't get confused when their site doesn't show up because the server isn't seeing a correctly-set Host header. --- routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes.go b/routes.go index b79243f..8900e80 100644 --- a/routes.go +++ b/routes.go @@ -27,7 +27,7 @@ func initRoutes(handler *Handler, r *mux.Router, cfg *config.Config, db *datasto } // Primary app routes - write := r.Host(hostSubroute).Subrouter() + write := r.PathPrefix("/").Subrouter() // Federation endpoint configurations wf := webfinger.Default(wfResolver{db, cfg})