[MM-15641] Set stricter caching policy for file downloads (#10857)

* Set stricter caching policy for file downloads

* Add private directive back to caching header for file downloads
Этот коммит содержится в:
Daniel Schalla
2019-05-21 17:10:39 +02:00
коммит произвёл GitHub
родитель 726d723537
Коммит 3e6fed8df4

Просмотреть файл

@@ -737,7 +737,7 @@ func getPublicFile(c *Context, w http.ResponseWriter, r *http.Request) {
}
func writeFileResponse(filename string, contentType string, contentSize int64, webserverMode string, fileReader io.Reader, forceDownload bool, w http.ResponseWriter, r *http.Request) *model.AppError {
w.Header().Set("Cache-Control", "max-age=2592000, private")
w.Header().Set("Cache-Control", "private, no-cache")
w.Header().Set("X-Content-Type-Options", "nosniff")
if contentSize > 0 {