aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/httpcaddyfile/directives.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2019-09-30 09:11:30 -0600
committerMatthew Holt <[email protected]>2019-09-30 09:11:30 -0600
commit1e662262179d326586d2beb849f842b82b7324c4 (patch)
tree1b2e79e4e27e7b4812f6566104568092bc7bcd7d /caddyconfig/httpcaddyfile/directives.go
parent7b4aa108c7d67416bf68574da6c5a43899715b3d (diff)
downloadcaddy-1e662262179d326586d2beb849f842b82b7324c4.tar.gz
caddy-1e662262179d326586d2beb849f842b82b7324c4.zip
httpcaddyfile: Add acme_ca and email global options
Also add ability to access options from individual unmarshalers through the Helper values
Diffstat (limited to 'caddyconfig/httpcaddyfile/directives.go')
-rw-r--r--caddyconfig/httpcaddyfile/directives.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/caddyconfig/httpcaddyfile/directives.go b/caddyconfig/httpcaddyfile/directives.go
index 2f89f6db7..0d7e0e4ca 100644
--- a/caddyconfig/httpcaddyfile/directives.go
+++ b/caddyconfig/httpcaddyfile/directives.go
@@ -80,11 +80,17 @@ func RegisterHandlerDirective(dir string, setupFunc UnmarshalHandlerFunc) {
// Caddyfile tokens.
type Helper struct {
*caddyfile.Dispenser
+ options map[string]interface{}
warnings *[]caddyconfig.Warning
matcherDefs map[string]map[string]json.RawMessage
parentBlock caddyfile.ServerBlock
}
+// Option gets the option keyed by name.
+func (h Helper) Option(name string) interface{} {
+ return h.options[name]
+}
+
// Caddyfiles returns the list of config files from
// which tokens in the current server block were loaded.
func (h Helper) Caddyfiles() []string {