File tree 2 files changed +56
-0
lines changed
all-in-one/config/envoyfilters
2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : networking.istio.io/v1alpha3
2
+ kind : EnvoyFilter
3
+ metadata :
4
+ name : higress-gateway-global-custom-response
5
+ namespace : higress-system
6
+ creationTimestamp : " 2000-01-01T00:00:00Z"
7
+ resourceVersion : " 1"
8
+ labels :
9
+ app : higress-gateway
10
+ higress : higress-system-higress-gateway
11
+ spec :
12
+ configPatches :
13
+ - applyTo : HTTP_FILTER
14
+ match :
15
+ context : GATEWAY
16
+ listener :
17
+ filterChain :
18
+ filter :
19
+ name : envoy.filters.network.http_connection_manager
20
+ patch :
21
+ operation : INSERT_FIRST
22
+ value :
23
+ name : envoy.filters.http.custom_response
24
+ typed_config :
25
+ ' @type ' : type.googleapis.com/envoy.extensions.filters.http.custom_response.v3.CustomResponse
Original file line number Diff line number Diff line change 352
352
353
353
mkdir -p $VOLUMES_ROOT /gateway/log
354
354
touch $VOLUMES_ROOT /gateway/log/access.log
355
+
356
+ checkConfigExists " higress-system" " networking.istio.io/v1alpha3" " envoyfilters" " higress-gateway-global-custom-response"
357
+ if [ $? -ne 0 ]; then
358
+ echo " The EnvoyFilter resource \" higress-gateway-global-custom-response\" doesn't exist. Create it now..."
359
+ read -r -d ' ' content << EOF
360
+ apiVersion: networking.istio.io/v1alpha3
361
+ kind: EnvoyFilter
362
+ metadata:
363
+ name: higress-gateway-global-custom-response
364
+ namespace: higress-system
365
+ labels:
366
+ app: higress-gateway
367
+ higress: higress-system-higress-gateway
368
+ spec:
369
+ configPatches:
370
+ - applyTo: HTTP_FILTER
371
+ match:
372
+ context: GATEWAY
373
+ listener:
374
+ filterChain:
375
+ filter:
376
+ name: envoy.filters.network.http_connection_manager
377
+ patch:
378
+ operation: INSERT_FIRST
379
+ value:
380
+ name: envoy.filters.http.custom_response
381
+ typed_config:
382
+ '@type': type.googleapis.com/envoy.extensions.filters.http.custom_response.v3.CustomResponse
383
+ EOF
384
+ publishConfig " higress-system" " networking.istio.io/v1alpha3" " envoyfilters" " higress-gateway-global-custom-response" " $content "
385
+ fi
355
386
}
356
387
357
388
checkConsole () {
You can’t perform that action at this time.
0 commit comments