fileserver: Fix Caddyfile parsing

Reported at https://github.com/mholt/caddy-sqlite-fs/issues/3
This commit is contained in:
Matthew Holt
2024-10-31 10:37:37 -06:00
parent b129ed6be8
commit 350ad38f63

View File

@ -78,7 +78,7 @@ func (fsrv *FileServer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
return d.ArgErr() return d.ArgErr()
} }
for d.NextBlock(0) { for nesting := d.Nesting(); d.NextBlock(nesting); {
switch d.Val() { switch d.Val() {
case "fs": case "fs":
if !d.NextArg() { if !d.NextArg() {