aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/httpcaddyfile/options.go
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2021-05-07 18:18:17 -0400
committerGitHub <[email protected]>2021-05-07 16:18:17 -0600
commit3cf443f0feee50a5de3f31daf79af1b8f70ebc76 (patch)
treec29945b648f0908d3c8fba14168351715ef4d114 /caddyconfig/httpcaddyfile/options.go
parentd4b2f1bcee2190d13bc96aa8da5ea530bd6b9a22 (diff)
downloadcaddy-3cf443f0feee50a5de3f31daf79af1b8f70ebc76.tar.gz
caddy-3cf443f0feee50a5de3f31daf79af1b8f70ebc76.zip
httpcaddyfile: Add `grace_period` global option (#4152)
See https://caddyserver.com/docs/json/apps/http/#grace_period
Diffstat (limited to 'caddyconfig/httpcaddyfile/options.go')
-rw-r--r--caddyconfig/httpcaddyfile/options.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/caddyconfig/httpcaddyfile/options.go b/caddyconfig/httpcaddyfile/options.go
index d95496c3f..905ecae8e 100644
--- a/caddyconfig/httpcaddyfile/options.go
+++ b/caddyconfig/httpcaddyfile/options.go
@@ -29,10 +29,11 @@ func init() {
RegisterGlobalOption("debug", parseOptTrue)
RegisterGlobalOption("http_port", parseOptHTTPPort)
RegisterGlobalOption("https_port", parseOptHTTPSPort)
+ RegisterGlobalOption("grace_period", parseOptDuration)
RegisterGlobalOption("default_sni", parseOptSingleString)
RegisterGlobalOption("order", parseOptOrder)
RegisterGlobalOption("storage", parseOptStorage)
- RegisterGlobalOption("storage_clean_interval", parseOptStorageCleanInterval)
+ RegisterGlobalOption("storage_clean_interval", parseOptDuration)
RegisterGlobalOption("acme_ca", parseOptSingleString)
RegisterGlobalOption("acme_ca_root", parseOptSingleString)
RegisterGlobalOption("acme_dns", parseOptACMEDNS)
@@ -178,7 +179,7 @@ func parseOptStorage(d *caddyfile.Dispenser, _ interface{}) (interface{}, error)
return storage, nil
}
-func parseOptStorageCleanInterval(d *caddyfile.Dispenser, _ interface{}) (interface{}, error) {
+func parseOptDuration(d *caddyfile.Dispenser, _ interface{}) (interface{}, error) {
if !d.Next() { // consume option name
return nil, d.ArgErr()
}