diff --git a/README.md b/README.md index 405ada64..367fae26 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ proxy is `localhost:8080`, which is the default one in our example. - You can specify a `MITM certificates cache`, to reuse them later for other requests to the same host, thus saving CPU. Not enabled by default, but you should use it in production! - Redirect normal HTTP traffic to a `custom handler`, when the target is a `relative path` (e.g. `/ping`) - You can choose the logger to use, by implementing the `Logger` interface +- You can `disable` the HTTP request headers `canonicalization`, by setting `PreventCanonicalization` to true ## Proxy modes 1. Regular HTTP proxy diff --git a/proxy.go b/proxy.go index 93dae3dc..918bd0a2 100644 --- a/proxy.go +++ b/proxy.go @@ -39,11 +39,11 @@ type ProxyHttpServer struct { CertStore CertStorage KeepHeader bool AllowHTTP2 bool - // When PreventCanonicalization is true, the header value passed in - // the request are sent as they are to the destination server, instead of - // following the HTTP RFC. - // This is useful when the header aren't considered case-insensitive - // by the target server. + // When PreventCanonicalization is true, the header names present in + // the request sent through the proxy are directly passed to the destination server, + // instead of following the HTTP RFC for their canonicalization. + // This is useful when the header name isn't treated as a case-insensitive + // value by the target server, because they don't follow the specs. PreventCanonicalization bool // KeepAcceptEncoding, if true, prevents the proxy from dropping // Accept-Encoding headers from the client.