Browse Source

节点切换功能

zjcqoo 6 years ago
parent
commit
141d37e9ed
1 changed files with 5 additions and 0 deletions
  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