mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
API: Cache-Control (browser caching) for datasource resources: part 2 (#63060)
* Check if header string contains "public" or "private" target values
This commit is contained in:
@@ -109,10 +109,11 @@ func allowCacheControl(rw web.ResponseWriter) bool {
|
||||
foundPrivate := false
|
||||
foundPublic := false
|
||||
for _, val := range ccHeaderValues {
|
||||
if val == "private" {
|
||||
strings.Contains(val, "private")
|
||||
if strings.Contains(val, "private") {
|
||||
foundPrivate = true
|
||||
}
|
||||
if val == "public" {
|
||||
if strings.Contains(val, "public") {
|
||||
foundPublic = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user