From 4d4f2cea8603f4d06c945bf50ce22dfc77babe7f Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 16 Jun 2017 12:35:15 -0400 Subject: [PATCH] PLT-6678 Change Cache-Control to private for files (#6660) --- api/file.go | 2 +- api4/file.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/file.go b/api/file.go index 9a5de56691..1e7c7d66d7 100644 --- a/api/file.go +++ b/api/file.go @@ -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 != "" { diff --git a/api4/file.go b/api4/file.go index 09132b9a16..a395fff655 100644 --- a/api4/file.go +++ b/api4/file.go @@ -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 != "" {