Skip to content

Commit 90ae6ee

Browse files
authored
Default value for added configuration option to keep backwards compatibility with old config (#103)
1 parent 0fc5a8e commit 90ae6ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

util.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ func prepareConfig(conf DNSConfig) (DNSConfig, error) {
4949
if conf.Database.Connection == "" {
5050
return conf, errors.New("missing database configuration option \"connection\"")
5151
}
52+
53+
// Default values for options added to config to keep backwards compatibility with old config
54+
if conf.API.ACMECacheDir == "" {
55+
conf.API.ACMECacheDir = "api-certs"
56+
}
57+
5258
return conf, nil
5359
}
5460

0 commit comments

Comments
 (0)