Skip to content
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

Lowercase storefront redirects to make them case insensitive. #1941

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

blittle
Copy link
Contributor

@blittle blittle commented Apr 3, 2024

WHAT is this pull request doing?

At the moment StorefrontRedirect does not match on URLs that are capitalized. This fixes that by .toLowerCase() the URL before querying the Storefront API. This also means that redirect URLs defined within the admin with capitalization won't ever be matched.

Fixes #908

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

shopify bot commented Apr 3, 2024

Oxygen deployed a preview of your bl-fix-redirect-lowercase branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment April 3, 202410:14 PM
subscriptions ✅ Successful (Logs) Preview deployment Inspect deployment April 3, 202410:14 PM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment April 3, 202410:14 PM
vite ✅ Successful (Logs) Preview deployment Inspect deployment April 3, 202410:14 PM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment April 3, 202410:14 PM
skeleton ✅ Successful (Logs) Preview deployment Inspect deployment April 3, 202410:14 PM

Learn more about Hydrogen's GitHub integration.

@blittle blittle merged commit 14bb5df into main Apr 4, 2024
13 checks passed
@blittle blittle deleted the bl-fix-redirect-lowercase branch April 4, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StorefrontRedirect() fails with capitalized paths
2 participants