aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2024-10-31 10:37:37 -0600
committerMatthew Holt <[email protected]>2024-10-31 10:37:37 -0600
commit350ad38f63f7a49ceb3821c58d689b85a27ec4e5 (patch)
tree83e713eaeb417bd3c46caac3139ec6f9c6c35db5 /modules/caddyhttp
parentb129ed6be88e40667a843bfab74abb3e5239bc8f (diff)
downloadcaddy-350ad38f63f7a49ceb3821c58d689b85a27ec4e5.tar.gz
caddy-350ad38f63f7a49ceb3821c58d689b85a27ec4e5.zip
fileserver: Fix Caddyfile parsing
Reported at https://github.com/mholt/caddy-sqlite-fs/issues/3
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go
index 71b7638e4..81c61611a 100644
--- a/modules/caddyhttp/fileserver/caddyfile.go
+++ b/modules/caddyhttp/fileserver/caddyfile.go
@@ -78,7 +78,7 @@ func (fsrv *FileServer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
return d.ArgErr()
}
- for d.NextBlock(0) {
+ for nesting := d.Nesting(); d.NextBlock(nesting); {
switch d.Val() {
case "fs":
if !d.NextArg() {