Location regex should respect Exact paths
If a location is marked as Exact, and the ingress uses regex matching, the resulting location block should respect this.
What this PR does / why we need it:
Even when an ingress has regex matching enabled, Exact paths should still be respected. Currently, they're ignored, which leads to non-intuitive behavior.
Types of changes
-
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 #11397
How Has This Been Tested?
A test case was added to validate that the change generates the expected location block in the resulting nginx config.
Checklist:
-
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I've read the CONTRIBUTION guide -
I have added unit and/or e2e tests to cover my changes. -
All new and existing tests passed.