MM-48924 Don't cache remote_entry.js files (#21817)
* MM-48924 Don't cache remote_entry.js files * Change caching of remote_entry.js to match root.html
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
242d7a4466
Коммит
29f29b1e5e
@@ -81,7 +81,11 @@ func staticFilesHandler(handler http.Handler) http.Handler {
|
||||
//wrap our ResponseWriter with our no-cache 404-handler
|
||||
w = ¬FoundNoCacheResponseWriter{ResponseWriter: w}
|
||||
|
||||
w.Header().Set("Cache-Control", "max-age=31556926, public")
|
||||
if path.Base(r.URL.Path) == "remote_entry.js" {
|
||||
w.Header().Set("Cache-Control", "no-cache, max-age=31556926, public")
|
||||
} else {
|
||||
w.Header().Set("Cache-Control", "max-age=31556926, public")
|
||||
}
|
||||
|
||||
if strings.HasSuffix(r.URL.Path, "/") {
|
||||
http.NotFound(w, r)
|
||||
|
||||
Ссылка в новой задаче
Block a user