From 501da21f209c9fad92c65c8ba02a969a03ec5379 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 24 Sep 2021 18:31:01 -0600 Subject: General minor improvements to docs --- modules/caddyhttp/vars.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'modules/caddyhttp/vars.go') 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. -- cgit v1.2.3