diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2022-08-08 12:49:39 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2022-08-08 12:50:06 -0600 |
commit | 8c72f343576684f012f97b087a79132583090eff (patch) | |
tree | 706fd9f3051d73462f317cf0f8421b08f2729be2 /modules/caddyhttp | |
parent | b9618b8b98e4267516ac9bd61f2fd4b7f905ab3c (diff) |
fileserver: Generate Etag from sidecar file
Don't use the primary/uncompressed file for Etag when serving sidecars.
This was just overlooked initially.
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r-- | modules/caddyhttp/fileserver/staticfiles.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/caddyhttp/fileserver/staticfiles.go b/modules/caddyhttp/fileserver/staticfiles.go index 93d529d..43ef088 100644 --- a/modules/caddyhttp/fileserver/staticfiles.go +++ b/modules/caddyhttp/fileserver/staticfiles.go @@ -374,6 +374,7 @@ func (fsrv *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request, next c continue } defer file.Close() + info = compressedInfo w.Header().Set("Content-Encoding", ae) w.Header().Del("Accept-Ranges") w.Header().Add("Vary", "Accept-Encoding") |