You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-12-19 23:52:17 +02:00
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user