mirror of
https://github.com/vbatts/imgsrv.git
synced 2025-01-27 06:10:08 +00:00
Revert "defaulting /assests switch to just look in the directory"
This reverts commit 81a51e78c9
.
that is too much access for now
This commit is contained in:
parent
81a51e78c9
commit
338cce6561
1 changed files with 1 additions and 13 deletions
14
server.go
14
server.go
|
@ -719,22 +719,10 @@ func routeAssets(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Set("Cache-Control", "max-age=315360000")
|
|
||||||
|
|
||||||
switch path {
|
switch path {
|
||||||
case "bootstrap.css":
|
case "bootstrap.css":
|
||||||
fmt.Fprintf(w, "%s", assets.BootstrapCss())
|
fmt.Fprintf(w, "%s", assets.BootstrapCss())
|
||||||
|
w.Header().Set("Cache-Control", "max-age=315360000")
|
||||||
w.Header().Set("Content-Type", "text/css")
|
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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue