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:

wasm envoy.yaml

  1. 1 cluster: web_service
  2. 2
  3. 3 http_filters:
  4. 4 - name: envoy.filters.http.wasm
  5. 5 typed_config:
  6. 6 "@type": type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
  7. 7 config:
  8. 8 name: "my_plugin"
  9. 9 root_id: "my_root_id"
  10. 10 # if your wasm filter requires custom configuration you can add
  11. 11 # as follows
  12. 12 configuration:
  13. 13 "@type": "type.googleapis.com/google.protobuf.StringValue"
  14. 14 value: |
  15. 15 {}
  16. 16 vm_config:
  17. 17 runtime: "envoy.wasm.runtime.v8"
  18. 18 vm_id: "my_vm_id"
  19. 19 code:
  20. 20 local:
  21. 21 filename: "lib/envoy_filter_http_wasm_example.wasm"
  22. 22 - name: envoy.filters.http.router
  23. 23
  24. 24 clusters:
  25. 25 - name: web_service
  26. 26 type: strict_dns

The preceding snippet configures a filter from a Wasm binary on local disk.