From 350ad38f63f7a49ceb3821c58d689b85a27ec4e5 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 31 Oct 2024 10:37:37 -0600 Subject: [PATCH] fileserver: Fix Caddyfile parsing Reported at https://github.com/mholt/caddy-sqlite-fs/issues/3 --- modules/caddyhttp/fileserver/caddyfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go index 71b7638e..81c61611 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() {