Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 660 Bytes

File metadata and controls

30 lines (22 loc) · 660 Bytes

Proxy-Wasm plugin example: HTTP config

Proxy-Wasm plugin that injects HTTP response header with a value from Envoy config.

Building

$ cargo build --target wasm32-wasi --release

Using in Envoy

This example can be run with docker compose and has a matching Envoy configuration.

$ docker compose up

Send HTTP request to localhost:10000/hello:

$ curl -I localhost:10000/hello
HTTP/1.1 200 OK
content-length: 40
content-type: text/plain
custom-header: The secret to life is meaningless unless you discover it yourself
date: Tue, 22 Nov 2022 04:09:05 GMT
server: envoy