Skip to content

Add support for rewriting URL with trailing slash #7559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind improvement
/area core
/milstone 2.21.x

What this PR does / why we need it:

This PR uses UrlHandlerFilter to rewrite URL with trailing slash.

Which issue(s) this PR fixes:

Fixes #5420

Special notes for your reviewer:

  1. Start Halo instance
  2. Request to /archives and /archives/ and see the result

Does this PR introduce a user-facing change?

支持自动重写尾部包含斜杠的 URL

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. area/core Issues or PRs related to the Halo Core labels Jun 16, 2025
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and wan92hen June 16, 2025 07:26
Copy link

f2c-ci-robot bot commented Jun 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lilgg for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

@ruibaby ruibaby merged commit 7d56018 into main Jun 17, 2025
8 of 9 checks passed
@JohnNiang JohnNiang deleted the refactor/trailing-slash branch June 19, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Halo博客的链接问题,链接末尾带斜杠会导致404
2 participants