1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-12-19 23:52:17 +02:00

Merge commit from fork

Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
Jan Larwig
2025-11-08 12:52:31 +01:00
committed by GitHub
parent 5993067505
commit f3f30fa976
4 changed files with 40 additions and 1 deletions

View File

@@ -53,6 +53,11 @@ func flattenHeaders(headers http.Header) {
func stripHeaders(headers []options.Header, next http.Handler) http.Handler {
return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
for _, header := range headers {
if header.InsecureSkipHeaderNormalization {
req.Header.Del(header.Name)
continue
}
stripNormalizedHeader(req, header)
}
next.ServeHTTP(rw, req)