mirror of https://github.com/vbatts/imgsrv.git
adding back the path matches for other assets
This commit is contained in:
parent
338cce6561
commit
f54091db6e
|
@ -1,7 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Fun Times. This is to serve as a single utility that
|
Fun Times. This is to serve as a single utility that
|
||||||
* can be an image server, that stores into a mongo backend,
|
* can be an image server, that stores into a mongo backend,
|
||||||
OR
|
OR
|
||||||
* the client side tool that pushes/pulls images to the running server.
|
* the client side tool that pushes/pulls images to the running server.
|
||||||
|
|
12
server.go
12
server.go
|
@ -719,10 +719,20 @@ 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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue