Add 'Cache: no' header, closes #41

This commit is contained in:
Philipp Heckel 2021-12-09 10:23:17 -05:00
parent d5be5d3e8c
commit d6fbccab55
11 changed files with 191 additions and 22 deletions

View file

@ -74,7 +74,7 @@ func execRun(c *cli.Context) error {
return errors.New("keepalive interval cannot be lower than five seconds")
} else if managerInterval < 5*time.Second {
return errors.New("manager interval cannot be lower than five seconds")
} else if cacheDuration < managerInterval {
} else if cacheDuration > 0 && cacheDuration < managerInterval {
return errors.New("cache duration cannot be lower than manager interval")
} else if keyFile != "" && !util.FileExists(keyFile) {
return errors.New("if set, key file must exist")