mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-08 05:42:47 +02:00
internal/controlplane: using envoy strip host port matching (#1126)
* internal/controlplane: using envoy strip host port matching With envoy 1.15.0 release, strip host port matching setting allows incoming request with Host "example:443" will match again route with domains match set to "example". Not that this is not standard HTTP behavior, but it's more convenient for users. Fixes #959 * docs/docs: add note about enable envoy strip host port matching
This commit is contained in:
parent
504197d83b
commit
489cdd8b63
3 changed files with 5 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
||||||
- authenticate: allow hot reloaded admin users config @cuonglm [GH-984]
|
- authenticate: allow hot reloaded admin users config @cuonglm [GH-984]
|
||||||
- authorize: include "kid" in JWT headers @cuonglm [GH-1046]
|
- authorize: include "kid" in JWT headers @cuonglm [GH-1046]
|
||||||
- config: both base64 and file reference can be used for "certificates" @dmitrif [GH-1055]
|
- config: both base64 and file reference can be used for "certificates" @dmitrif [GH-1055]
|
||||||
|
- envoy: enable strip host port matching @cuonglm [GH-1126]
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|
||||||
|
|
|
@ -225,8 +225,9 @@ func buildMainHTTPConnectionManagerFilter(options *config.Options, domains []str
|
||||||
RandomSampling: &envoy_type_v3.Percent{Value: options.TracingSampleRate * 100},
|
RandomSampling: &envoy_type_v3.Percent{Value: options.TracingSampleRate * 100},
|
||||||
},
|
},
|
||||||
// See https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers#x-forwarded-for
|
// See https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers#x-forwarded-for
|
||||||
UseRemoteAddress: &wrappers.BoolValue{Value: true},
|
UseRemoteAddress: &wrappers.BoolValue{Value: true},
|
||||||
SkipXffAppend: false,
|
SkipXffAppend: false,
|
||||||
|
StripMatchingHostPort: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
return &envoy_config_listener_v3.Filter{
|
return &envoy_config_listener_v3.Filter{
|
||||||
|
|
|
@ -308,6 +308,7 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) {
|
||||||
"validateClusters": false
|
"validateClusters": false
|
||||||
},
|
},
|
||||||
"statPrefix": "ingress",
|
"statPrefix": "ingress",
|
||||||
|
"stripMatchingHostPort": true,
|
||||||
"tracing": {
|
"tracing": {
|
||||||
"randomSampling": {
|
"randomSampling": {
|
||||||
"value": 0.01
|
"value": 0.01
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue