Enable configuration of plugins using configmap
This commit is contained in:
parent
9c6873a55d
commit
c0db19b0ec
5 changed files with 76 additions and 1 deletions
|
|
@ -61,6 +61,7 @@ const (
|
|||
globalAuthCacheKey = "global-auth-cache-key"
|
||||
globalAuthCacheDuration = "global-auth-cache-duration"
|
||||
luaSharedDictsKey = "lua-shared-dicts"
|
||||
plugins = "plugins"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -341,6 +342,15 @@ func ReadConfig(src map[string]string) config.Configuration {
|
|||
delete(conf, workerProcesses)
|
||||
}
|
||||
|
||||
if val, ok := conf[plugins]; ok {
|
||||
to.Plugins = strings.Split(val, ",")
|
||||
for i := range to.Plugins {
|
||||
to.Plugins[i] = strings.TrimSpace(to.Plugins[i])
|
||||
}
|
||||
|
||||
delete(conf, plugins)
|
||||
}
|
||||
|
||||
to.CustomHTTPErrors = filterErrors(errors)
|
||||
to.SkipAccessLogURLs = skipUrls
|
||||
to.WhitelistSourceRange = whiteList
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue