From f04b69ecad003d0f1f770376ab972d6b5cf8ceec Mon Sep 17 00:00:00 2001 From: oers Date: Sun, 6 Mar 2016 12:27:08 +0100 Subject: [PATCH] Use Router.StrictSlash to allow calling of host:port/webpath instead of host:port/webppath/ --- web/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/web.go b/web/web.go index ea15083..44e4527 100644 --- a/web/web.go +++ b/web/web.go @@ -35,7 +35,7 @@ func CreateWeb(cfg *config.Config, pat *pat.Router, asset func(string) ([]byte, pat.Path(WebPath + "/css/{file:.*}").Methods("GET").HandlerFunc(web.Static("assets/css/{{file}}")) pat.Path(WebPath + "/js/{file:.*}").Methods("GET").HandlerFunc(web.Static("assets/js/{{file}}")) pat.Path(WebPath + "/fonts/{file:.*}").Methods("GET").HandlerFunc(web.Static("assets/fonts/{{file}}")) - pat.Path(WebPath + "/").Methods("GET").HandlerFunc(web.Index()) + pat.StrictSlash(true).Path(WebPath + "/").Methods("GET").HandlerFunc(web.Index()) return web }