Parcourir la source

节点切换功能

zjcqoo il y a 6 ans
Parent
commit
141d37e9ed
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      lua/http-body-hash.lua

+ 5 - 0
lua/http-body-hash.lua

@@ -0,0 +1,5 @@
+if ngx.ctx._switched then
+  local chunk = ngx.arg[1]
+  ngx.arg[1] = #chunk .. ',' .. ngx.crc32_long(chunk)
+  ngx.arg[2] = true
+end