Fix badly encoded etag value
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -172,14 +172,8 @@ func (s *Server) ServeSPA(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Set("ETag", etag)
|
quotedETag := `"` + etag + `"`
|
||||||
|
w.Header().Set("ETag", quotedETag)
|
||||||
if matchETag := r.Header.Get("If-None-Match"); matchETag != "" {
|
|
||||||
if matchETag == etag {
|
|
||||||
w.WriteHeader(http.StatusNotModified)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if strings.HasSuffix(path, ".js") || strings.HasSuffix(path, ".css") ||
|
if strings.HasSuffix(path, ".js") || strings.HasSuffix(path, ".css") ||
|
||||||
strings.HasSuffix(path, ".png") || strings.HasSuffix(path, ".jpg") ||
|
strings.HasSuffix(path, ".png") || strings.HasSuffix(path, ".jpg") ||
|
||||||
|
|||||||
Reference in New Issue
Block a user