Skip to content

Commit

Permalink
ut for bugfix
Browse files Browse the repository at this point in the history
Signed-off-by: qicz <qiczzhu@gmail.com>
  • Loading branch information
qicz committed Aug 2, 2024
1 parent a87366c commit 35d7e9b
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "http-route"
http:
- name: "first-listener"
address: "0.0.0.0"
port: 10080
hostnames:
- "*"
path:
mergeSlashes: true
escapedSlashesAction: UnescapeAndRedirect
routes:
- name: "rewrite-route"
pathMatch:
prefix: "/origin/"
hostname: gateway.envoyproxy.io
headerMatches:
- name: ":authority"
exact: gateway.envoyproxy.io
destination:
name: "rewrite-route-dest"
settings:
- endpoints:
- host: "1.2.3.4"
port: 50000
urlRewrite:
path:
prefixMatchReplace: /rewrite/
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- circuitBreakers:
thresholds:
- maxRetries: 1024
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_ONLY
edsClusterConfig:
edsConfig:
ads: {}
resourceApiVersion: V3
serviceName: rewrite-route-dest
lbPolicy: LEAST_REQUEST
name: rewrite-route-dest
outlierDetection: {}
perConnectionBufferLimitBytes: 32768
type: EDS
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- clusterName: rewrite-route-dest
endpoints:
- lbEndpoints:
- endpoint:
address:
socketAddress:
address: 1.2.3.4
portValue: 50000
loadBalancingWeight: 1
loadBalancingWeight: 1
locality:
region: rewrite-route-dest/backend/0
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- address:
socketAddress:
address: 0.0.0.0
portValue: 10080
defaultFilterChain:
filters:
- name: envoy.filters.network.http_connection_manager
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
commonHttpProtocolOptions:
headersWithUnderscoresAction: REJECT_REQUEST
http2ProtocolOptions:
initialConnectionWindowSize: 1048576
initialStreamWindowSize: 65536
maxConcurrentStreams: 100
httpFilters:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
suppressEnvoyHeaders: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
rds:
configSource:
ads: {}
resourceApiVersion: V3
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
useRemoteAddress: true
name: first-listener
drainType: MODIFY_ONLY
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- ignorePortInHostMatching: true
name: first-listener
virtualHosts:
- domains:
- gateway.envoyproxy.io
name: first-listener/gateway_envoyproxy_io
routes:
- match:
headers:
- name: :authority
stringMatch:
exact: gateway.envoyproxy.io
pathSeparatedPrefix: /origin
name: rewrite-route
route:
cluster: rewrite-route-dest
prefixRewrite: /rewrite
upgradeConfigs:
- upgradeType: websocket

0 comments on commit 35d7e9b

Please sign in to comment.