From 66cf15d2d91e8b858c1a73faf9a7403a24354301 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 6 Feb 2015 08:40:59 -0800 Subject: [PATCH] fixed rice issue again --- server/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/main.go b/server/main.go index 146bc2ca6..9d65a2bc9 100644 --- a/server/main.go +++ b/server/main.go @@ -127,8 +127,11 @@ func main() { // create handler for static resources assetserve := http.FileServer(rice.MustFindBox("app").HTTPBox()) http.Handle("/robots.txt", assetserve) - http.Handle("/", assetserve) http.Handle("/static/", http.StripPrefix("/static", assetserve)) + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + r.URL.Path = "/" + assetserve.ServeHTTP(w, r) + }) // create the router and add middleware mux := router.New()