amdadulbari opened a new issue, #11462:
URL: https://github.com/apache/apisix/issues/11462
### Current Behavior
When attempting to match a route based on a header set by the global scope
plugin **proxy-rewrite**, the route does not match and returns a **404 Route
Not Found error**. It appears that the global scope plugin proxy-rewrite is
**executing after the route matching phase**, causing the header not to be
available during route matching.
### Expected Behavior
The route should match based on the header set by the global scope plugin
proxy-rewrite, and the request should be successfully routed according to the
specified criteria.
### Error Logs
_No response_
### Steps to Reproduce
1. Configure the proxy-rewrite plugin in the global scope to add a header:
`{
"_meta": {
"disable": false
},
"headers": {
"x-handler": "yes"
}
}
`
2. Add a route with the following configuration to match the header:
`{
"vars": [
[
"http_X-Handler",
"==",
"yes"
]
]
}
`
3. Send a request that should match the route based on the header set by the
global scope plugin.
### Environment
- APISIX Version: 3.9.1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]