Fix missing cache-control when cache mactch
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -183,6 +183,13 @@ func (s *Server) ServeSPA(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Cache-Control", "public, max-age=3600")
|
||||
}
|
||||
|
||||
if matchETag := r.Header.Get("If-None-Match"); matchETag != "" {
|
||||
if matchETag == quotedETag {
|
||||
w.WriteHeader(http.StatusNotModified)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
http.FileServer(s.spaFS).ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user