Skip to content

Commit ab71805

Browse files
authored
fix: add additional prohibited request headers to prevent forwarding of transport headers (#16)
1 parent a1d1aaa commit ab71805

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

internal/server/handlerMain.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ var prohibitedRequestHeaders = []string{
3737
authorizationHeader,
3838
"User-Agent",
3939
"Host",
40+
// HTTP hop-by-hop headers that should not be forwarded to downstream services
41+
"Accept-Encoding",
42+
"Content-Encoding",
43+
"Transfer-Encoding",
44+
"Connection",
45+
"Keep-Alive",
46+
"Upgrade",
47+
"TE",
48+
"Trailer",
49+
"Proxy-Authorization",
50+
"Proxy-Authenticate",
4051
}
4152

4253
type ExtractedRequestData struct {

0 commit comments

Comments
 (0)