ingress-nginx
ingress-nginx copied to clipboard
Use PCRE on proxy redirect property
NGINX accepts PCRE patterns on the proxy_redirect property.
This PR introduces URLWithNginxVariableRegex, a validation to make sure that both proxy-redirect-from and proxy-redirect-to annotations accept this pattern.
Added e2e tests to cover it.
What this PR does / why we need it:
This PR covers at least these two open issues: 12917 10698
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] CVE Report (Scanner found CVE and adding report)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation only
Which issue/s this PR fixes
Fixes #12917 Fixes #10698
How Has This Been Tested?
Created e2e tests, after that: make kind-e2e-test.
Checklist:
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I've read the CONTRIBUTION guide
- [x] I have added unit and/or e2e tests to cover my changes.
- [x] All new and existing tests passed.