First, send a request to example-route, which triggers both plugins.
The global clone adds X-Global-Header and the route-scoped plugin adds X-Route-Header:
curl -i "$KONNECT_PROXY_URL/anything" \
--no-progress-meter --fail-with-body
curl -i "http://localhost:8000/anything" \
--no-progress-meter --fail-with-body
In the response from httpbin, look for both headers in the headers object:
{
"headers": {
"X-Global-Header": "isSetGlobally",
"X-Route-Header": "isSetOnRoute"
}
}
Now send a request to example-route-2:
curl -i "$KONNECT_PROXY_URL/global" \
--no-progress-meter --fail-with-body
curl -i "http://localhost:8000/global" \
--no-progress-meter --fail-with-body
Only the global clone should run, so you should only see X-Global-Header:
{
"headers": {
"X-Global-Header": "isSetGlobally"
}
}
The global clone runs on both Routes, while request-transformer only runs on example-route, confirming that the two instances are fully independent.