And when I use the same config :
\"proxy-rewrite\": {
\"headers\": {
\"X-USER-ID\": \"USER1-ID\"
}
}
In the route config it works :
curl --location --request PUT
"http://$APISIX_URL:$APISIX_PORT/apisix/admin/routes/api-v1" \
--header "X-API-KEY: $APISIX_API_ADMIN_KEY" \
--header "Content-Type: application/json" \
--data-raw "{
\"uri\": \"/v1/*\",
\"host\": \"$APISIX_HOST\",
\"plugins\": {
\"key-auth\": {},
\"consumer-restriction\": {
\"whitelist\": [
\"user1\",
\"user2\"
]
},
\"proxy-rewrite\": {
\"headers\": {
\"X-USER-ID\": \"USER1-ID\"
}
}
},
\"service_id\": \"api-v1\"
}"
I mean that when I configure the plugin proxy-rewrite on the routes I have
the header X-USER-ID set with the value USER1-ID (everything is fine) and
when I configure it on the consumer user1 and I call the endpoint with the
apikey of user1, the header X-USER-ID does not exist.
Issue description
origin mail: https://lists.apache.org/thread/o0zh8pddh50ytcf99g8jr5wnxbf9p9t3
User Description:
and
Environment
apisix version):uname -a):nginx -Voropenresty -V):curl http://127.0.0.1:9090/v1/server_infoto get the info from server-info API):luarocks --version):