File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ type Listener struct {
18
18
}
19
19
20
20
// NewListener will wrap nl, automatically handling PROXY headers for all connections.
21
- // To only require PROXY headers from certain connections , use SetFilter.
21
+ // To expect PROXY headers only from certain addresses/subnets , use SetFilter.
22
22
//
23
- // By default, all connections must provide a PROXY header within the provided timeout.
23
+ // By default, all connections must provide a PROXY header within the specified timeout.
24
24
func NewListener (nl net.Listener , t time.Duration ) * Listener {
25
25
l := & Listener {
26
26
Listener : nl ,
@@ -88,11 +88,10 @@ func (l *Listener) Filter() []Rule {
88
88
return f
89
89
}
90
90
91
- // SetFilter allows limiting PROXY header parsing to matching Subnets with an optional timeout.
92
- // If filter is nil, all connections will be required to provide a PROXY header.
91
+ // SetFilter allows limiting PROXY header requirements to matching Subnets with an optional timeout.
92
+ // If filter is nil, all connections will be required to provide a PROXY header (the default) .
93
93
//
94
- // Connections not matching any rule will be returned from Accept from the underlying listener
95
- // directly without reading a PROXY header.
94
+ // Connections not matching any rule will be returned directly without reading a PROXY header.
96
95
//
97
96
// Duplicate subnet rules will automatically be removed and the lowest non-zero timeout will be used.
98
97
//
You can’t perform that action at this time.
0 commit comments