Skip to content

Commit 1d3b862

Browse files
authored
[configcat] ensure that browser updates the cacge (#19125)
1 parent f1475ab commit 1d3b862

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/proxy/plugins/configcat/configcat.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ func (c *ConfigCat) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddy
9393
arr := strings.Split(r.URL.Path, "/")
9494
configVersion := arr[len(arr)-1]
9595

96+
// ensure that the browser must revalidate it, but still cache it
97+
w.Header().Set("Cache-Control", "no-cache")
98+
9699
if c.configCatConfigDir != "" {
97100
c.ServeFromFile(w, r, configVersion)
98101
return nil

0 commit comments

Comments
 (0)