Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikPelli committed Dec 27, 2024
1 parent 78e5ec9 commit 05ef96e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 05ef96e

Please sign in to comment.