aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/caddyhttp/vars.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/caddyhttp/vars.go b/modules/caddyhttp/vars.go
index f5afe264a..9908ada9b 100644
--- a/modules/caddyhttp/vars.go
+++ b/modules/caddyhttp/vars.go
@@ -190,6 +190,8 @@ func (m VarsMatcher) Match(r *http.Request) bool {
varStr = vv.String()
case error:
varStr = vv.Error()
+ case nil:
+ varStr = ""
default:
varStr = fmt.Sprintf("%v", vv)
}
@@ -281,6 +283,8 @@ func (m MatchVarsRE) Match(r *http.Request) bool {
varStr = vv.String()
case error:
varStr = vv.Error()
+ case nil:
+ varStr = ""
default:
varStr = fmt.Sprintf("%v", vv)
}