You've already forked collage-maker
Move css to seperate file and add no-cache for dev assets
This commit is contained in:
5
main.go
5
main.go
@@ -53,7 +53,10 @@ func main() {
|
||||
|
||||
if localAssets {
|
||||
httpFileServer := http.FileServer(http.Dir("web"))
|
||||
http.Handle("/", httpFileServer)
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Cache-Control", "no-cache")
|
||||
httpFileServer.ServeHTTP(w, r)
|
||||
})
|
||||
} else {
|
||||
fs, err := fs.Sub(webFS, "web")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user