Rebase over main
This commit is contained in:
parent
f793b464ee
commit
2614b485ac
6 changed files with 2 additions and 54 deletions
|
@ -1,6 +1,5 @@
|
|||
local balancer = require("balancer")
|
||||
local monitor = require("monitor")
|
||||
local plugins = require("plugins")
|
||||
|
||||
local luaconfig = ngx.shared.luaconfig
|
||||
local enablemetrics = luaconfig:get("enablemetrics")
|
||||
|
@ -10,5 +9,4 @@ balancer.log()
|
|||
|
||||
if enablemetrics then
|
||||
monitor.call()
|
||||
end
|
||||
plugins.run()
|
||||
end
|
|
@ -1,2 +0,0 @@
|
|||
local plugins = require("plugins")
|
||||
plugins.run()
|
|
@ -1,4 +1,2 @@
|
|||
local lua_ingress = require("lua_ingress")
|
||||
local plugins = require("plugins")
|
||||
lua_ingress.header()
|
||||
plugins.run()
|
||||
lua_ingress.header()
|
|
@ -41,17 +41,6 @@ local function initialize_ingress(statusport, enablemetrics, ocsp, ingress)
|
|||
certificate = res
|
||||
certificate.is_ocsp_stapling_enabled = ocsp
|
||||
end
|
||||
|
||||
ok, res = pcall(require, "plugins")
|
||||
if not ok then
|
||||
error("require failed: " .. tostring(res))
|
||||
else
|
||||
plugins = res
|
||||
end
|
||||
|
||||
-- TODO: Re-enable 3rd party plugins
|
||||
--plugins.init({ {{ range $idx, $plugin := $cfg.Plugins }}{{ if $idx }},{{ end }}{{ $plugin | quote }}{{ end }} })
|
||||
plugins.init({})
|
||||
end
|
||||
|
||||
return { initialize_ingress = initialize_ingress }
|
|
@ -1,14 +1,12 @@
|
|||
local function initialize_worker(enablemetrics, monitorbatchsize)
|
||||
local lua_ingress = require("lua_ingress")
|
||||
local balancer = require("balancer")
|
||||
local plugins = require("plugins")
|
||||
local monitor = require("monitor")
|
||||
lua_ingress.init_worker()
|
||||
balancer.init_worker()
|
||||
if enablemetrics then
|
||||
monitor.init_worker(monitorbatchsize)
|
||||
end
|
||||
plugins.run()
|
||||
end
|
||||
|
||||
return { initialize_worker = initialize_worker }
|
|
@ -1141,40 +1141,7 @@ stream {
|
|||
|
||||
header_filter_by_lua_file /etc/nginx/lua/nginx/ngx_conf_srv_hdr_filter.lua;
|
||||
|
||||
<<<<<<< HEAD
|
||||
header_filter_by_lua_block {
|
||||
lua_ingress.header()
|
||||
}
|
||||
|
||||
log_by_lua_block {
|
||||
balancer.log()
|
||||
{{ if $all.EnableMetrics }}
|
||||
monitor.call()
|
||||
{{ end }}
|
||||
}
|
||||
||||||| parent of b65dae6b8 (Remove inline lua script from template)
|
||||
header_filter_by_lua_block {
|
||||
lua_ingress.header()
|
||||
plugins.run()
|
||||
}
|
||||
|
||||
body_filter_by_lua_block {
|
||||
plugins.run()
|
||||
}
|
||||
|
||||
log_by_lua_block {
|
||||
balancer.log()
|
||||
{{ if $all.EnableMetrics }}
|
||||
monitor.call()
|
||||
{{ end }}
|
||||
|
||||
plugins.run()
|
||||
}
|
||||
=======
|
||||
body_filter_by_lua_file /etc/nginx/lua/nginx/ngx_conf_srv_body_filter.lua;
|
||||
|
||||
log_by_lua_file /etc/nginx/lua/nginx/ngx_conf_log_block.lua;
|
||||
>>>>>>> b65dae6b8 (Remove inline lua script from template)
|
||||
|
||||
{{ if not $location.Logs.Access }}
|
||||
access_log off;
|
||||
|
|
Loading…
Reference in a new issue