From 338cce6561b6baddcf01dcd9f9753d9bd6da26d2 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Mon, 5 Aug 2013 18:43:10 -0400 Subject: [PATCH] Revert "defaulting /assests switch to just look in the directory" This reverts commit 81a51e78c9bd5a0dad1d8cd4d7e027aa7bada1be. that is too much access for now --- server.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/server.go b/server.go index 42cca28..7ba4afd 100644 --- a/server.go +++ b/server.go @@ -719,22 +719,10 @@ func routeAssets(w http.ResponseWriter, r *http.Request) { return } - w.Header().Set("Cache-Control", "max-age=315360000") - switch path { case "bootstrap.css": fmt.Fprintf(w, "%s", assets.BootstrapCss()) + w.Header().Set("Cache-Control", "max-age=315360000") w.Header().Set("Content-Type", "text/css") - case "bootstrap.js": - fmt.Fprintf(w, "%s", assets.BootstrapJs()) - w.Header().Set("Content-Type", "application/javascript") - case "jquery.js": - fmt.Fprintf(w, "%s", assets.JqueryJs()) - w.Header().Set("Content-Type", "application/javascript") - case "jqud.js": - fmt.Fprintf(w, "%s", assets.TagCloudJs()) - w.Header().Set("Content-Type", "application/javascript") - default: - http.ServeFile(w,r,path) } }