Discover books, shows, and movies at your level. Track your progress by filling your Shelf with what you find, and share with other language learners. *No dusting required. shlf.space

*:fmt

Signed-off-by: brookjeynes <me@brookjeynes.dev>

authored by brookjeynes.dev and committed by tangled.org d0382ac3 345a1616

+5 -5
+5 -5
internal/server/static.go
··· 8 8 "shelf.app/static" 9 9 ) 10 10 11 - func (s *Server) HandleStatic () http.Handler { 12 - var staticHandler http.Handler; 11 + func (s *Server) HandleStatic() http.Handler { 12 + var staticHandler http.Handler 13 13 14 14 if s.config.Core.Dev { 15 15 fileSystem := http.Dir("./static/files") ··· 31 31 32 32 func Cache(h http.Handler) http.Handler { 33 33 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 34 - path:=strings.Split(r.URL.Path, "?")[0] 34 + path := strings.Split(r.URL.Path, "?")[0] 35 35 36 - if strings.HasSuffix(path, ".js"){ 36 + if strings.HasSuffix(path, ".js") { 37 37 w.Header().Set("Cache-Control", "public, max-age=31536000, immutable") 38 - }else{ 38 + } else { 39 39 w.Header().Set("Cache-Control", "public, max-age=3600") 40 40 } 41 41