mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-04 06:53:36 +00:00
acmeserver: Add sign_with_root for Caddyfile (#6345)
* Added sign_with_root option available in the Caddyfile * Added tests for sign_with_root to validate the adapted JSON config
This commit is contained in:
parent
f6d2c293e7
commit
e6f46c8d78
2 changed files with 73 additions and 0 deletions
|
|
@ -42,6 +42,7 @@ func init() {
|
|||
// domains <domains...>
|
||||
// ip_ranges <addresses...>
|
||||
// }
|
||||
// sign_with_root
|
||||
// }
|
||||
func parseACMEServer(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) {
|
||||
h.Next() // consume directive name
|
||||
|
|
@ -136,6 +137,11 @@ func parseACMEServer(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error
|
|||
acmeServer.Policy = &Policy{}
|
||||
}
|
||||
acmeServer.Policy.Deny = r
|
||||
case "sign_with_root":
|
||||
if h.NextArg() {
|
||||
return nil, h.ArgErr()
|
||||
}
|
||||
acmeServer.SignWithRoot = true
|
||||
default:
|
||||
return nil, h.Errf("unrecognized ACME server directive: %s", h.Val())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue