Rendering: Add configuration options for renderKey lifetime (#57339)

* Add configuration options for `renderKey` lifetime

* Rename config key to `render_key_lifetime`

* Update conf/defaults.ini

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>

* Add `render_key_lifetime` to sample.ini

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
This commit is contained in:
Villena Guillaume
2022-11-03 12:06:55 +01:00
committed by GitHub
co-authored by Joan López de la Franca Beltran
parent 90ac300d10
commit e9dc7fb85c
4 changed files with 14 additions and 2 deletions
+2
View File
@@ -247,6 +247,7 @@ type Cfg struct {
RendererCallbackUrl string
RendererAuthToken string
RendererConcurrentRequestLimit int
RendererRenderKeyLifeTime time.Duration
// Security
DisableInitAdminCreation bool
@@ -1486,6 +1487,7 @@ func (cfg *Cfg) readRenderingSettings(iniFile *ini.File) error {
}
cfg.RendererConcurrentRequestLimit = renderSec.Key("concurrent_render_request_limit").MustInt(30)
cfg.RendererRenderKeyLifeTime = renderSec.Key("render_key_lifetime").MustDuration(5 * time.Minute)
cfg.ImagesDir = filepath.Join(cfg.DataPath, "png")
cfg.CSVsDir = filepath.Join(cfg.DataPath, "csv")