mirror of
https://github.com/joohoi/acme-dns.git
synced 2025-07-12 08:48:19 +07:00
Make ACME cache directory location configurable (#81)
* Remove trailing whitespace from README and config * Make ACME cache directory location configurable
This commit is contained in:

committed by
Joona Hoikkala

parent
fde566fe67
commit
3006cb712b
@ -243,6 +243,8 @@ tls = "none"
|
||||
# only used if tls = "cert"
|
||||
tls_cert_privkey = "/etc/tls/example.org/privkey.pem"
|
||||
tls_cert_fullchain = "/etc/tls/example.org/fullchain.pem"
|
||||
# only used if tls = "letsencrypt"
|
||||
acme_cache_dir = "api-certs"
|
||||
# CORS AllowOrigins, wildcards can be used
|
||||
corsorigins = [
|
||||
"*"
|
||||
|
@ -47,6 +47,8 @@ tls = "none"
|
||||
# only used if tls = "cert"
|
||||
tls_cert_privkey = "/etc/tls/example.org/privkey.pem"
|
||||
tls_cert_fullchain = "/etc/tls/example.org/fullchain.pem"
|
||||
# only used if tls = "letsencrypt"
|
||||
acme_cache_dir = "api-certs"
|
||||
# CORS AllowOrigins, wildcards can be used
|
||||
corsorigins = [
|
||||
"*"
|
||||
|
2
main.go
2
main.go
@ -81,7 +81,7 @@ func startHTTPAPI() {
|
||||
switch Config.API.TLS {
|
||||
case "letsencrypt":
|
||||
m := autocert.Manager{
|
||||
Cache: autocert.DirCache("api-certs"),
|
||||
Cache: autocert.DirCache(Config.API.ACMECacheDir),
|
||||
Prompt: autocert.AcceptTOS,
|
||||
HostPolicy: autocert.HostWhitelist(Config.API.Domain),
|
||||
}
|
||||
|
1
types.go
1
types.go
@ -58,6 +58,7 @@ type httpapi struct {
|
||||
TLS string
|
||||
TLSCertPrivkey string `toml:"tls_cert_privkey"`
|
||||
TLSCertFullchain string `toml:"tls_cert_fullchain"`
|
||||
ACMECacheDir string `toml:"acme_cache_dir"`
|
||||
CorsOrigins []string
|
||||
UseHeader bool `toml:"use_header"`
|
||||
HeaderName string `toml:"header_name"`
|
||||
|
Reference in New Issue
Block a user