mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-28 05:59:10 +02:00
23 lines
765 B
Go
23 lines
765 B
Go
package envoyconfig
|
|
|
|
import envoy_type_matcher_v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
|
|
|
|
func buildLocalReplyTypeMatcher(localReplyType string) *envoy_type_matcher_v3.MetadataMatcher {
|
|
return &envoy_type_matcher_v3.MetadataMatcher{
|
|
Filter: "envoy.filters.http.lua",
|
|
Path: []*envoy_type_matcher_v3.MetadataMatcher_PathSegment{{
|
|
Segment: &envoy_type_matcher_v3.MetadataMatcher_PathSegment_Key{
|
|
Key: "pomerium_local_reply_type",
|
|
},
|
|
}},
|
|
Value: &envoy_type_matcher_v3.ValueMatcher{
|
|
MatchPattern: &envoy_type_matcher_v3.ValueMatcher_StringMatch{
|
|
StringMatch: &envoy_type_matcher_v3.StringMatcher{
|
|
MatchPattern: &envoy_type_matcher_v3.StringMatcher_Exact{
|
|
Exact: localReplyType,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|