From 35c6891009a8d306f99f39691aeb76ea9eb22f0c Mon Sep 17 00:00:00 2001 From: Fuyuan Bie <9142170+biefy@users.noreply.github.com> Date: Mon, 22 Apr 2024 21:16:12 -0700 Subject: [PATCH] docs: Fix commands for testing jwt based routing (#3243) * Update http-routing.md Fix commands for testing jwt based routing. Signed-off-by: Fuyuan Bie <9142170+biefy@users.noreply.github.com> * Update latest http-routing.md Signed-off-by: Fuyuan Bie <9142170+biefy@users.noreply.github.com> --------- Signed-off-by: Fuyuan Bie <9142170+biefy@users.noreply.github.com> --- site/content/en/latest/tasks/traffic/http-routing.md | 4 ++-- site/content/en/v1.0.1/tasks/traffic/http-routing.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/en/latest/tasks/traffic/http-routing.md b/site/content/en/latest/tasks/traffic/http-routing.md index bf1a7596637..4f4ed06e588 100644 --- a/site/content/en/latest/tasks/traffic/http-routing.md +++ b/site/content/en/latest/tasks/traffic/http-routing.md @@ -204,7 +204,7 @@ TOKEN=$(curl https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/ Test routing to the `foo-svc` backend by specifying a JWT Token with a claim `name: John Doe`. ```shell -curl -sS -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/" | jq .pod +curl -sS -H "Host: foo.example.com" -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/login" | jq .pod "foo-backend-6df8cc6b9f-fmwcg" ``` @@ -217,7 +217,7 @@ TOKEN=$(curl https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/ Test HTTP routing to the `bar-svc` backend by specifying a JWT Token with a claim `name: Tom`. ```shell -curl -sS -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/" | jq .pod +curl -sS -H "Host: bar.example.com" -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/" | jq .pod "bar-backend-6688b8944c-s8htr" ``` diff --git a/site/content/en/v1.0.1/tasks/traffic/http-routing.md b/site/content/en/v1.0.1/tasks/traffic/http-routing.md index 12e1773a91f..39a3c733f40 100644 --- a/site/content/en/v1.0.1/tasks/traffic/http-routing.md +++ b/site/content/en/v1.0.1/tasks/traffic/http-routing.md @@ -204,7 +204,7 @@ TOKEN=$(curl https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/ Test routing to the `foo-svc` backend by specifying a JWT Token with a claim `name: John Doe`. ```shell -curl -sS -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/" | jq .pod +curl -sS -H "Host: foo.example.com" -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/login" | jq .pod "foo-backend-6df8cc6b9f-fmwcg" ``` @@ -217,7 +217,7 @@ TOKEN=$(curl https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/ Test HTTP routing to the `bar-svc` backend by specifying a JWT Token with a claim `name: Tom`. ```shell -curl -sS -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/" | jq .pod +curl -sS -H "Host: bar.example.com" -H "Authorization: Bearer $TOKEN" "http://${GATEWAY_HOST}/" | jq .pod "bar-backend-6688b8944c-s8htr" ```