summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/vars.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2021-09-24 18:31:01 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2021-09-24 18:31:01 -0600
commit501da21f209c9fad92c65c8ba02a969a03ec5379 (patch)
treec60876dc13b4277bb933feea19b4494a26f639ed /modules/caddyhttp/vars.go
parent3336faf25466b1b2d9a007f5468d05a887e16775 (diff)
General minor improvements to docs
Diffstat (limited to 'modules/caddyhttp/vars.go')
-rw-r--r--modules/caddyhttp/vars.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/caddyhttp/vars.go b/modules/caddyhttp/vars.go
index 479ef0a..5779b5d 100644
--- a/modules/caddyhttp/vars.go
+++ b/modules/caddyhttp/vars.go
@@ -29,9 +29,14 @@ func init() {
caddy.RegisterModule(MatchVarsRE{})
}
-// VarsMiddleware is an HTTP middleware which sets variables
-// in the context, mainly for use by placeholders. The
-// placeholders have the form: `{http.vars.variable_name}`
+// VarsMiddleware is an HTTP middleware which sets variables to
+// have values that can be used in the HTTP request handler
+// chain. The primary way to access variables is with placeholders,
+// which have the form: `{http.vars.variable_name}`, or with
+// the `vars` and `vars_regexp` request matchers.
+//
+// The key is the variable name, and the value is the value of the
+// variable. Both the name and value may use or contain placeholders.
type VarsMiddleware map[string]string
// CaddyModule returns the Caddy module information.