We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 27fef95 + e7ba6fa commit 4ea89deCopy full SHA for 4ea89de
reverseproxy.go
@@ -68,10 +68,11 @@ func (p *ReverseProxy) init() {
68
69
for idx, addr := range p.opt.addresses {
70
p.clients[idx] = &fasthttp.HostClient{
71
- Addr: addr,
72
- Name: _fasthttpHostClientName,
73
- IsTLS: p.opt.tlsConfig != nil,
74
- TLSConfig: p.opt.tlsConfig,
+ Addr: addr,
+ Name: _fasthttpHostClientName,
+ IsTLS: p.opt.tlsConfig != nil,
+ TLSConfig: p.opt.tlsConfig,
75
+ DisablePathNormalizing: p.opt.disablePathNormalizing,
76
}
77
78
@@ -82,10 +83,11 @@ func (p *ReverseProxy) init() {
82
83
p.bla = nil
84
p.clients = append(p.clients,
85
&fasthttp.HostClient{
- Addr: p.oldAddr,
86
87
88
+ Addr: p.oldAddr,
89
90
91
})
92
93
reverseproxy_option.go
@@ -28,6 +28,9 @@ type buildOption struct {
28
29
// timeout specify the timeout context with each request.
30
timeout time.Duration
31
+
32
+ // disablePathNormalizing disable path normalizing.
33
+ disablePathNormalizing bool
34
35
36
type funcBuildOption struct {
@@ -78,3 +81,10 @@ func WithTimeout(d time.Duration) Option {
81
o.timeout = d
79
80
+// WithDisablePathNormalizing sets whether disable path normalizing.
+func WithDisablePathNormalizing(isDisablePathNormalizing bool) Option {
+ return newFuncBuildOption(func(o *buildOption) {
+ o.disablePathNormalizing = isDisablePathNormalizing
+ })
+}
0 commit comments