mirror of
https://github.com/alibaba/higress.git
synced 2026-02-23 12:10:53 +08:00
Co-authored-by: 纪卓志 <jizhuozhi.george@gmail.com> Co-authored-by: 007gzs <007gzs@gmail.com>
86 lines
3.4 KiB
YAML
86 lines
3.4 KiB
YAML
# Copyright (c) 2023 Alibaba Group Holding Ltd.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
static_resources:
|
|
listeners:
|
|
address:
|
|
socket_address:
|
|
address: 0.0.0.0
|
|
port_value: 10000
|
|
filter_chains:
|
|
- filters:
|
|
- name: envoy.filters.network.http_connection_manager
|
|
typed_config:
|
|
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
|
stat_prefix: ingress_http
|
|
codec_type: AUTO
|
|
route_config:
|
|
name: local_routes
|
|
virtual_hosts:
|
|
- name: local_service
|
|
domains:
|
|
- "*"
|
|
routes:
|
|
- name: lucy
|
|
match:
|
|
prefix: "/lucy"
|
|
direct_response:
|
|
status: 200
|
|
- name: index
|
|
match:
|
|
prefix: "/"
|
|
direct_response:
|
|
status: 200
|
|
http_filters:
|
|
- name: envoy.filters.http.wasm
|
|
typed_config:
|
|
"@type": type.googleapis.com/udpa.type.v1.TypedStruct
|
|
type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
|
|
value:
|
|
config:
|
|
name: "http_body"
|
|
configuration:
|
|
"@type": type.googleapis.com/google.protobuf.StringValue
|
|
value: |-
|
|
{
|
|
"name": "Alice",
|
|
"_rules_": [
|
|
{
|
|
"_match_domain_": [
|
|
"foo"
|
|
],
|
|
"name": "Foo"
|
|
},
|
|
{
|
|
"_match_domain_": [
|
|
"bar"
|
|
],
|
|
"name": "Bar"
|
|
},
|
|
{
|
|
"_match_route_": [
|
|
"lucy"
|
|
],
|
|
"name": "Lucy"
|
|
}
|
|
]
|
|
}
|
|
vm_config:
|
|
runtime: "envoy.wasm.runtime.v8"
|
|
code:
|
|
local:
|
|
filename: "/etc/envoy/proxy-wasm-plugins/wrapper_say_hello.wasm"
|
|
- name: envoy.filters.http.router
|
|
typed_config:
|
|
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router |