From 42a6628935d9bdda3391daf8665b39ef046ccbe0 Mon Sep 17 00:00:00 2001
From: Paolo Barbolini <paolo@paolo565.org>
Date: Fri, 20 Mar 2020 13:54:28 +0100
Subject: reverseproxy: Add Alt-Svc to Hop-by-hop headers list (#3159)

Adds `Alt-Svc` to the list of headers that get removed when proxying
to a backend.

This fixes the issue of having the contents of the Alt-Svc header
duplicated when proxying to another Caddy server.
---
 modules/caddyhttp/reverseproxy/reverseproxy.go | 1 +
 1 file changed, 1 insertion(+)

(limited to 'modules/caddyhttp')

diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go
index 3601212..4837736 100644
--- a/modules/caddyhttp/reverseproxy/reverseproxy.go
+++ b/modules/caddyhttp/reverseproxy/reverseproxy.go
@@ -725,6 +725,7 @@ type Selector interface {
 // obsoleted RFC 2616 (section 13.5.1) and are used for backward
 // compatibility.
 var hopHeaders = []string{
+	"Alt-Svc",
 	"Connection",
 	"Proxy-Connection", // non-standard but still sent by libcurl and rejected by e.g. google
 	"Keep-Alive",
-- 
cgit v1.2.3