소스 검색

Merge pull request #1636 from mattrobenolt/patch-2

Fix more Cache-Control headers
Torkel Ödegaard 10 년 전
부모
커밋
c8687560d6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      pkg/cmd/web.go

+ 2 - 2
pkg/cmd/web.go

@@ -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, must-revalidate")
+			c.Resp.Header().Set("Cache-Control", "max-age=0, must-revalidate, no-cache")
 		}
 	}