opplion opened a new pull request, #2872:
URL: https://github.com/apache/apisix-ingress-controller/pull/2872

   ### Type of change:
   
   - [x] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   - [ ] Documentation
   - [ ] Refactor
   - [ ] Chore
   - [x] CI/CD or Tests
   
   ### What this PR does / why we need it:
   
   This PR adds support for path redirects in Gateway API `HTTPRoute` 
`RequestRedirect` filters.
   
   Previously, `requestRedirect.path` was ignored and the APISIX redirect 
plugin always used the original `$request_uri`. A redirect intended to change 
the path could therefore redirect the request back to itself, resulting in a 
"Too many redirects" error.
   
   This change:
   
   - Supports `ReplaceFullPath` using the APISIX redirect plugin's `uri` field.
   - Supports `ReplacePrefixMatch` using the `regex_uri` field while preserving 
the unmatched path suffix.
   - Preserves the original query string after replacing the path.
   - Reuses the prefix replacement logic shared with `URLRewrite`.
   - Preserves the existing behavior when no path replacement is configured.
   - Adds unit and e2e coverage for full-path redirects, prefix redirects, 
hostname replacement, and query-string preservation.
   
   No documentation was changed because this implements the existing Gateway 
API `RequestRedirect` contract and does not introduce controller-specific 
configuration.
   
   Fixes #2857
   
   ### Pre-submission checklist:
   
   - [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   - [x] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [x] Is this PR backward compatible?


-- 
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]

Reply via email to