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

feat(cloud-function): redirect capitalization #11151

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

caugner
Copy link
Contributor

@caugner caugner commented May 17, 2024

Summary

(MP-1111)

Problem

We currently serve the same content independent of capitalization:

Solution

Fetch the metadata.json and match the URL (excluding search parameters) against the mdn_url in it.


How did you test this change?

  1. Ran npm ci && npm start in /cloud-function.
  2. Verified that http://localhost:5100/en-US/docs/web?foo=bar redirects to http://localhost:5100/en-US/docs/Web?foo=bar.

@caugner caugner requested a review from a team as a code owner May 17, 2024 23:07
@github-actions github-actions bot added redirects all things related to redirecting cloud-function labels May 17, 2024
Copy link
Contributor

@fiji-flo fiji-flo left a comment

Choose a reason for hiding this comment

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

Can we use a way that doesn't add another fetch please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud-function redirects all things related to redirecting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants