diff options
Diffstat (limited to 'modules/caddyhttp/templates')
-rw-r--r-- | modules/caddyhttp/templates/caddyfile.go | 5 | ||||
-rw-r--r-- | modules/caddyhttp/templates/templates.go | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/modules/caddyhttp/templates/caddyfile.go b/modules/caddyhttp/templates/caddyfile.go index d948da0..1336a60 100644 --- a/modules/caddyhttp/templates/caddyfile.go +++ b/modules/caddyhttp/templates/caddyfile.go @@ -53,10 +53,5 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) } } } - - if t.IncludeRoot == "" { - t.IncludeRoot = "{http.var.root}" - } - return t, nil } diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go index 1cd347c..05a2f63 100644 --- a/modules/caddyhttp/templates/templates.go +++ b/modules/caddyhttp/templates/templates.go @@ -50,6 +50,9 @@ func (t *Templates) Provision(ctx caddy.Context) error { if t.MIMETypes == nil { t.MIMETypes = defaultMIMETypes } + if t.IncludeRoot == "" { + t.IncludeRoot = "{http.vars.root}" + } return nil } |