diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-10-16 15:18:02 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-10-16 15:18:02 -0600 |
commit | a458544d9f6e6aaf72aeab0454acfa482880d3d6 (patch) | |
tree | 7fa6b1806809ede3f81e9949ec819864f294526a /modules/caddyhttp/rewrite | |
parent | 2f91b44587fe487b6a05c1c7e56833247e4b8c79 (diff) |
Minor enhancements/fixes to rewrite directive and template virt req's
Diffstat (limited to 'modules/caddyhttp/rewrite')
-rw-r--r-- | modules/caddyhttp/rewrite/caddyfile.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddyhttp/rewrite/caddyfile.go b/modules/caddyhttp/rewrite/caddyfile.go index cb65d43..a1fc874 100644 --- a/modules/caddyhttp/rewrite/caddyfile.go +++ b/modules/caddyhttp/rewrite/caddyfile.go @@ -31,6 +31,9 @@ func init() { func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) { var rewr Rewrite for h.Next() { + if !h.NextArg() { + return nil, h.ArgErr() + } rewr.URI = h.Val() if h.NextArg() { return nil, h.ArgErr() |