From bbd747aa46f6cfd38013d4e8e6e90f04658b6ed1 Mon Sep 17 00:00:00 2001 From: Pablu23 Date: Mon, 21 Jul 2025 12:27:05 +0200 Subject: [PATCH] Temporarily strip etags --- router.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/router.go b/router.go index ed99a82..4fdf768 100644 --- a/router.go +++ b/router.go @@ -128,8 +128,23 @@ func createRequest(r *http.Request, host *Host, remote string) (*http.Request, e return req, nil } +var etagHeaders = map[string]struct{}{ + "ETag": {}, + "If-Modified-Since": {}, + "If-Match": {}, + "If-None-Match": {}, + "If-Range": {}, + "If-Unmodified-Since": {}, +} + func copyRequestHeader(origin *http.Request, destination *http.Request) { for name, values := range origin.Header { + + // Skip etag Headers + if _, ok := etagHeaders[name]; ok { + continue + } + for _, value := range values { destination.Header.Set(name, value) }