aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/fileserver/caddyfile.go
diff options
context:
space:
mode:
authorAziz Rmadi <[email protected]>2024-04-13 05:49:55 -0500
committerGitHub <[email protected]>2024-04-13 06:49:55 -0400
commit567d96c6245fbca6086687daa40d3f37530b4f36 (patch)
tree0625e96ec8f67aeac693017c033452d368de2813 /modules/caddyhttp/fileserver/caddyfile.go
parent5d8b45c9fbbd40c5c1a43f23a6d0c2f284d2b6ba (diff)
downloadcaddy-567d96c6245fbca6086687daa40d3f37530b4f36.tar.gz
caddy-567d96c6245fbca6086687daa40d3f37530b4f36.zip
fileserver: read etags from precomputed files (#6222)
Diffstat (limited to 'modules/caddyhttp/fileserver/caddyfile.go')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go
index d90e4f9a0..f65695018 100644
--- a/modules/caddyhttp/fileserver/caddyfile.go
+++ b/modules/caddyhttp/fileserver/caddyfile.go
@@ -164,6 +164,13 @@ func (fsrv *FileServer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
}
fsrv.PassThru = true
+ case "etag_file_extensions":
+ etagFileExtensions := d.RemainingArgs()
+ if len(etagFileExtensions) == 0 {
+ return d.ArgErr()
+ }
+ fsrv.EtagFileExtensions = etagFileExtensions
+
default:
return d.Errf("unknown subdirective '%s'", d.Val())
}