mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-56651] fix: set cache duration (#26338)
* fix: set cache duration * fix: extra 0
This commit is contained in:
parent
eaaf75a232
commit
fd713ae9bb
@ -35,7 +35,7 @@ var MediaContentTypes = [...]string{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func WriteFileResponse(filename string, contentType string, contentSize int64, lastModification time.Time, webserverMode string, fileReader io.ReadSeeker, forceDownload bool, w http.ResponseWriter, r *http.Request) {
|
func WriteFileResponse(filename string, contentType string, contentSize int64, lastModification time.Time, webserverMode string, fileReader io.ReadSeeker, forceDownload bool, w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Cache-Control", "private, no-cache")
|
w.Header().Set("Cache-Control", "private, max-age=86400")
|
||||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||||
|
|
||||||
if contentSize > 0 {
|
if contentSize > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user