Skip to content

fix(plugin/redirect): ensure redirect when scheme is not https#12561

Merged
SkyeYoung merged 2 commits into
apache:masterfrom
SkyeYoung:young/fix/plugin/redirect/redirect-when-not-https
Sep 19, 2025
Merged

fix(plugin/redirect): ensure redirect when scheme is not https#12561
SkyeYoung merged 2 commits into
apache:masterfrom
SkyeYoung:young/fix/plugin/redirect/redirect-when-not-https

Conversation

@SkyeYoung

Copy link
Copy Markdown
Member

Description

In the original logic, using values like X-Forwarded-Proto: any_value could bypass the redirect.

Obviously, this logic is incorrect, so in this PR it's adjusted to redirect when X-Forwarded-Proto is not https.

part of #12500

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@SkyeYoung
SkyeYoung marked this pull request as ready for review August 29, 2025 02:43
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Aug 29, 2025
@SkyeYoung
SkyeYoung merged commit df3cc40 into apache:master Sep 19, 2025
30 of 33 checks passed
jizhuozhi pushed a commit to jizhuozhi/apisix that referenced this pull request Oct 18, 2025
…che#12561)

* fix(plugin/redirect): ensure redirect when scheme is not `https`

* test: add redirect when not https case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants