PLT-6678 Change Cache-Control to private for files (#6660)

This commit is contained in:
Harrison Healey
2017-06-16 09:35:15 -07:00
committed by Corey Hulen
parent 1897a7ea9e
commit 4d4f2cea86
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ func getPublicFileOld(c *Context, w http.ResponseWriter, r *http.Request) {
}
func writeFileResponse(filename string, contentType string, bytes []byte, w http.ResponseWriter, r *http.Request) *model.AppError {
w.Header().Set("Cache-Control", "max-age=2592000, public")
w.Header().Set("Cache-Control", "max-age=2592000, private")
w.Header().Set("Content-Length", strconv.Itoa(len(bytes)))
if contentType != "" {
+1 -1
View File
@@ -299,7 +299,7 @@ func getPublicFile(c *Context, w http.ResponseWriter, r *http.Request) {
}
func writeFileResponse(filename string, contentType string, bytes []byte, toDownload bool, w http.ResponseWriter, r *http.Request) *model.AppError {
w.Header().Set("Cache-Control", "max-age=2592000, public")
w.Header().Set("Cache-Control", "max-age=2592000, private")
w.Header().Set("Content-Length", strconv.Itoa(len(bytes)))
if contentType != "" {