From c1d1a2fa5997a12148089177d01d25f71f1908a4 Mon Sep 17 00:00:00 2001 From: Martijn Swaagman Date: Mon, 2 Dec 2024 10:52:21 +0100 Subject: [PATCH] fix: update response and doc --- examples/envoy_filter_metadata/README.md | 10 +++++----- examples/envoy_filter_metadata/src/lib.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/envoy_filter_metadata/README.md b/examples/envoy_filter_metadata/README.md index 8a6251d..373bfd3 100644 --- a/examples/envoy_filter_metadata/README.md +++ b/examples/envoy_filter_metadata/README.md @@ -17,17 +17,17 @@ and has a matching Envoy configuration. $ docker compose up ``` -Send a HTTP request to `localhost:10000/` will return the configured response. +Send a HTTP request to `localhost:10000` will return the configured response. ```sh -$ curl localhost:10000/ +$ curl localhost:10000 Welcome, set the `x-custom-metadata` header to change the response! ``` -Send a HTTP request to `localhost:10000/` with a `x-custom-metadata` header value to get the uppercased value in the response. +Send a HTTP request to `localhost:10000` with a `x-custom-metadata` header value to get the uppercased value in the response. The response will also set a response header `uppercased-metadata: SOME-VALUE`. ```sh -$ curl localhost:10000/ -H "x-custom-metadata: some-value" -Custom response with Envoy metadata: "SOME-VALUE"! +$ curl localhost:10000 -H "x-custom-metadata: some-value" +Custom response with Envoy metadata: "SOME-VALUE" ``` diff --git a/examples/envoy_filter_metadata/src/lib.rs b/examples/envoy_filter_metadata/src/lib.rs index febdb74..5498697 100644 --- a/examples/envoy_filter_metadata/src/lib.rs +++ b/examples/envoy_filter_metadata/src/lib.rs @@ -40,7 +40,7 @@ impl HttpContext for MetadataHttp { vec![("Powered-By", "proxy-wasm"), ("uppercased-metadata", &data)], Some( format!( - "Custom response with Envoy metadata: {:?}!\n", + "Custom response with Envoy metadata: {:?}\n", data ) .as_bytes(),