Another cache header fix

This commit is contained in:
Torkel Ödegaard
2015-03-24 17:16:13 +01:00
parent a5c3855233
commit 7919d79347
4 changed files with 30 additions and 2 deletions
+2 -2
View File
@@ -66,12 +66,12 @@ func newMacaron() *macaron.Macaron {
func mapStatic(m *macaron.Macaron, dir string, prefix string) {
headers := func(c *macaron.Context) {
c.Resp.Header().Set("Cache-Control", "public max-age: 3600")
c.Resp.Header().Set("Cache-Control", "public, max-age: 3600")
}
if setting.Env == setting.DEV {
headers = func(c *macaron.Context) {
c.Resp.Header().Set("Cache-Control", "max-age: 0")
c.Resp.Header().Set("Cache-Control", "max-age: 0, must-revalidate")
}
}