MM-31721: Fix Cache-Control directives (#16763)
We were incorrectly setting the cache control to public when it should be rather private. https://mattermost.atlassian.net/browse/MM-31721 ```release-notes Fix Cache-Control headers to instruct that responses may only be cached on browsers. ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f8caa6c841
Коммит
dccdc9f6cf
@@ -175,7 +175,7 @@ func authorizeOAuthPage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("X-Frame-Options", "SAMEORIGIN")
|
||||
w.Header().Set("Content-Security-Policy", "frame-ancestors 'self'")
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
w.Header().Set("Cache-Control", "no-cache, max-age=31556926, public")
|
||||
w.Header().Set("Cache-Control", "no-cache, max-age=31556926")
|
||||
|
||||
staticDir, _ := fileutils.FindDir(model.CLIENT_DIR)
|
||||
http.ServeFile(w, r, filepath.Join(staticDir, "root.html"))
|
||||
|
||||
Ссылка в новой задаче
Block a user