ingress-nginx icon indicating copy to clipboard operation
ingress-nginx copied to clipboard

Allow the use of relative redirects

Open chriss-de opened this issue 1 year ago • 5 comments

With this PR it is possible to use relative redirects as described in RFC7231 (section 7.1.2). Nginx has a config flag absolute_redirect that is on by default and cannot be changed via annotation or configmap. This PR allows the user to switch absolute_redirect off. This annotation/configmap setting is named relative-redirect and inverses the logic to not conflict with the default settings.

What this PR does / why we need it:

This change let you use relative redirects instead of the absolute redirects nginx uses in default.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] 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

#12162

How Has This Been Tested?

This PR includes e2e tests

Checklist:

  • [x] My change requires a change to the documentation.
  • [x] 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.

chriss-de avatar Oct 11 '24 11:10 chriss-de

Hi @chriss-de. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Oct 11 '24 11:10 k8s-ci-robot

Deploy Preview for kubernetes-ingress-nginx ready!

Name Link
Latest commit aa415be8e686c61a99b10c597b75c5a728188790
Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/6735069d63729e000849fbba
Deploy Preview https://deploy-preview-12161--kubernetes-ingress-nginx.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 11 '24 11:10 netlify[bot]

@chriss-de thanks for your contribution

Could you consider creating an issue first for this. It would help so much if a layman needed complete descriptive and accurate explaining of what the problem is why it is important for the project to change its code, is available as issue description (along with the answers to questions asked in the template of a new bug report). Additionally it will help to know how many users benefit from the proposed changes.

Many things happened and so some decisions were made. We focus now on security & Gateway-API . We also deprecated multiple features that are potentially popular but don't help in maintaining & supporting a secure & stable controller. Hence absolute critical definitive data is needed during triaging, as the resources are really strained so not possible for developers to triage and clone and test etc etc etc.

thanks

longwuyuan avatar Oct 11 '24 12:10 longwuyuan

golangci-lint gets OOM killed

chriss-de avatar Nov 12 '24 09:11 chriss-de

Please rebase to get the updated go ci linter https://github.com/kubernetes/ingress-nginx/commit/0207d1878a2455a45eeb00a6daf2599b2754b4e6

strongjz avatar Nov 13 '24 16:11 strongjz

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chriss-de, Gacko

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Nov 13 '24 20:11 k8s-ci-robot