diff options
author | Hayder <[email protected]> | 2024-03-30 09:24:50 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-30 07:24:50 -0600 |
commit | 1217449609050471dfb70fdf35c9a22d738e2bef (patch) | |
tree | 5fdf600bcfb9d7f607e41678e2e14057e4f4e693 | |
parent | e0bf179c1a0ee2fd6847ebb443ddd36fe8fc5421 (diff) | |
download | caddy-1217449609050471dfb70fdf35c9a22d738e2bef.tar.gz caddy-1217449609050471dfb70fdf35c9a22d738e2bef.zip |
admin: Use xxhash for etag (#6207)
-rw-r--r-- | admin.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,7 +26,6 @@ import ( "expvar" "fmt" "hash" - "hash/fnv" "io" "net" "net/http" @@ -41,6 +40,7 @@ import ( "time" "github.com/caddyserver/certmagic" + "github.com/cespare/xxhash/v2" "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -946,7 +946,7 @@ func (h adminHandler) originAllowed(origin *url.URL) bool { // etagHasher returns a the hasher we used on the config to both // produce and verify ETags. -func etagHasher() hash.Hash32 { return fnv.New32a() } +func etagHasher() hash.Hash { return xxhash.New() } // makeEtag returns an Etag header value (including quotes) for // the given config path and hash of contents at that path. |