mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Request Limiter reloadable config (#25095)
This commit introduces a new reloadable stanza to the server config to allow disabling the Request Limiter.
This commit is contained in:
@@ -1432,6 +1432,12 @@ func (c *ServerCommand) Run(args []string) int {
|
||||
infoKeys = append(infoKeys, "administrative namespace")
|
||||
info["administrative namespace"] = config.AdministrativeNamespacePath
|
||||
|
||||
infoKeys = append(infoKeys, "request limiter")
|
||||
info["request limiter"] = "enabled"
|
||||
if config.RequestLimiter != nil && config.RequestLimiter.Disable {
|
||||
info["request limiter"] = "disabled"
|
||||
}
|
||||
|
||||
sort.Strings(infoKeys)
|
||||
c.UI.Output("==> Vault server configuration:\n")
|
||||
|
||||
@@ -1661,6 +1667,8 @@ func (c *ServerCommand) Run(args []string) int {
|
||||
// Setting log request with the new value in the config after reload
|
||||
core.ReloadLogRequestsLevel()
|
||||
|
||||
core.ReloadRequestLimiter()
|
||||
|
||||
// reloading HCP link
|
||||
hcpLink, err = c.reloadHCPLink(hcpLink, config, core, hcpLogger)
|
||||
if err != nil {
|
||||
@@ -3095,6 +3103,10 @@ func createCoreConfig(c *ServerCommand, config *server.Config, backend physical.
|
||||
AdministrativeNamespacePath: config.AdministrativeNamespacePath,
|
||||
}
|
||||
|
||||
if config.RequestLimiter != nil {
|
||||
coreConfig.DisableRequestLimiter = config.RequestLimiter.Disable
|
||||
}
|
||||
|
||||
if c.flagDev {
|
||||
coreConfig.EnableRaw = true
|
||||
coreConfig.EnableIntrospection = true
|
||||
|
||||
Reference in New Issue
Block a user