소스 검색

测试 vary 头是否会影响缓存

zjcqoo 6 년 전
부모
커밋
7c0a3df870
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      lua/http-enc-res-hdr.lua

+ 1 - 0
lua/http-enc-res-hdr.lua

@@ -103,6 +103,7 @@ local function nodeSwitched()
   addHdr('--switched', '1')
 
   ngx.header['cache-control'] = 'no-cache'
+  ngx.header['vary'] = '--url'
   ngx.var._switched = resLenStr
   ngx.ctx._switched = true