mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-14146 Update CSP for local image proxy (#10277)
This commit is contained in:
@@ -71,6 +71,11 @@ func (backend *LocalBackend) GetImage(w http.ResponseWriter, r *http.Request, im
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("X-Frame-Options", "deny")
|
||||
w.Header().Set("X-XSS-Protection", "1; mode=block")
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
w.Header().Set("Content-Security-Policy", "default-src 'none'; img-src data:; style-src 'unsafe-inline'")
|
||||
|
||||
backend.impl.ServeHTTP(w, req)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user