summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/templates/templates.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-07-11 17:07:52 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-07-11 17:07:52 -0600
commit4698352b20872557e624c54c1b4a1e0074f0baca (patch)
treeac1c77bccd7a1d23cb8e1fd361ed334a3890a80c /modules/caddyhttp/templates/templates.go
parent9343403358bd34b787a209b41c5b820781f78890 (diff)
parenteb8625f7744ba5e72b51549adc086e45313267cb (diff)
Merge branch 'v2-handlers' into v2
# Conflicts: # modules/caddyhttp/caddyhttp.go # modules/caddyhttp/fileserver/staticfiles.go # modules/caddyhttp/routes.go # modules/caddyhttp/server.go # modules/caddyhttp/staticresp.go # modules/caddyhttp/staticresp_test.go
Diffstat (limited to 'modules/caddyhttp/templates/templates.go')
-rw-r--r--modules/caddyhttp/templates/templates.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go
index 85b0bc2..9a41b6d 100644
--- a/modules/caddyhttp/templates/templates.go
+++ b/modules/caddyhttp/templates/templates.go
@@ -35,9 +35,9 @@ func init() {
// Templates is a middleware which execute response bodies as templates.
type Templates struct {
- FileRoot string `json:"file_root,omitempty"`
- MIMETypes []string `json:"mime_types,omitempty"`
- Delimiters []string `json:"delimiters,omitempty"`
+ IncludeRoot string `json:"include_root,omitempty"`
+ MIMETypes []string `json:"mime_types,omitempty"`
+ Delimiters []string `json:"delimiters,omitempty"`
}
// Provision provisions t.
@@ -107,8 +107,8 @@ func (t *Templates) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddy
// executeTemplate executes the template contained in wb.buf and replaces it with the results.
func (t *Templates) executeTemplate(rr caddyhttp.ResponseRecorder, r *http.Request) error {
var fs http.FileSystem
- if t.FileRoot != "" {
- fs = http.Dir(t.FileRoot)
+ if t.IncludeRoot != "" {
+ fs = http.Dir(t.IncludeRoot)
}
ctx := &templateContext{