--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by admin. --- DateTime: 2025/9/24 18:14 --- local cjson = require("cjson") local dict = ngx.shared.routes_cache ngx.req.read_body() local body = ngx.req.get_body_data() local new_rules = cjson.decode(body) for path, target in pairs(new_rules) do dict:set(path, target) end ngx.say(cjson.encode({ status = "ok", count = #new_rules }))