Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Prevent single wildcards from matching path separators for URL Rewrites #506

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

Conversation

mschoettle
Copy link
Contributor

Description

Following the change for URL redirects in #501 make it consistent for URL Redirects as well.

Related Issue

#501

Motivation and Context

A single * wildcard should not match the path separator.

How Has This Been Tested?

cargo test

Screenshots (if appropriate):

…URL Rewrites

BREAKING CHANGE: Up to version 2.33.1 the wildcard `*` was matching the path separator. For example, `/{*}/{*}/` matched `/assets/images/logo/`. In later versions, the default has changed such that `*` does not match the path separator. In contrast, double wildcard (`**`) can match also a path separator.
Copy link

semanticdiff-com bot commented Dec 1, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  src/settings/mod.rs  48% smaller
  docs/content/features/url-redirects.md Unsupported file format
  docs/content/features/url-rewrites.md Unsupported file format
  tests/rewrites.rs  0% smaller

@joseluisq joseluisq added enhancement New feature or request v2 v2 release breaking those changes could contain a breaking change labels Dec 2, 2024
Copy link
Collaborator

@joseluisq joseluisq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@joseluisq joseluisq merged commit 2737f4c into static-web-server:master Dec 2, 2024
37 checks passed
@mschoettle mschoettle deleted the rewrites-literal-separator branch December 2, 2024 11:01
@joseluisq joseluisq changed the title refactor: prevent single wildcards from matching path separators for URL Rewrites Prevent single wildcards from matching path separators for URL Rewrites Dec 3, 2024
@joseluisq joseluisq added this to the v2.34.0 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking those changes could contain a breaking change enhancement New feature or request v2 v2 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants