Skip to content

Commit

Permalink
Default value for added configuration option to keep backwards compat…
Browse files Browse the repository at this point in the history
…ibility with old config (#103)
  • Loading branch information
joohoi committed Aug 12, 2018
1 parent 0fc5a8e commit 90ae6ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ func prepareConfig(conf DNSConfig) (DNSConfig, error) {
if conf.Database.Connection == "" {
return conf, errors.New("missing database configuration option \"connection\"")
}

// Default values for options added to config to keep backwards compatibility with old config
if conf.API.ACMECacheDir == "" {
conf.API.ACMECacheDir = "api-certs"
}

return conf, nil
}

Expand Down

0 comments on commit 90ae6ee

Please sign in to comment.