Wasm
Attention
The Wasm filter is experimental and is currently under active development. Capabilities will be expanded over time and the configuration structures are likely to change.
The HTTP Wasm filter is used to implement an HTTP filter with a Wasm plugin.
Note
This filter is not supported on Windows.
Example configuration
Example filter configuration:
1 cluster: web_service
2
3 http_filters:
4 - name: envoy.filters.http.wasm
5 typed_config:
6 "@type": type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
7 config:
8 name: "my_plugin"
9 root_id: "my_root_id"
10 # if your wasm filter requires custom configuration you can add
11 # as follows
12 configuration:
13 "@type": "type.googleapis.com/google.protobuf.StringValue"
14 value: |
15 {}
16 vm_config:
17 runtime: "envoy.wasm.runtime.v8"
18 vm_id: "my_vm_id"
19 code:
20 local:
21 filename: "lib/envoy_filter_http_wasm_example.wasm"
22 - name: envoy.filters.http.router
23
24 clusters:
25 - name: web_service
26 type: strict_dns
The preceding snippet configures a filter from a Wasm binary on local disk.