We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b35651 commit 0cd1f16Copy full SHA for 0cd1f16
rootfs/etc/nginx/lua/tcp_udp_configuration.lua
@@ -1,5 +1,6 @@
1
local ngx = ngx
2
local tostring = tostring
3
+local cjson = require("cjson.safe")
4
-- this is the Lua representation of TCP/UDP Configuration
5
local tcp_udp_configuration_data = ngx.shared.tcp_udp_configuration_data
6
@@ -37,6 +38,14 @@ function _M.call()
37
38
return
39
end
40
41
+ local _, backends_err = cjson.decode(backends)
42
+
43
+ if backends_err then
44
+ ngx.log(ngx.ERR, "could not parse backends data: ", backends_err)
45
+ return
46
+ end
47
48
49
local success, err_conf = tcp_udp_configuration_data:set("backends", backends)
50
if not success then
51
ngx.log(ngx.ERR, "dynamic-configuration: error updating configuration: " .. tostring(err_conf))
0 commit comments