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

fix(cloud-function): redirect blog/curriculum/play without locale #10654

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Mar 5, 2024

Summary

Problem

We usually redirect if the locale is missing from the url, e.g. https://developer.mozilla.org/plus to https://developer.mozilla.org/en-US/plus.

However, this doesn't work for:

Solution

Update the responsible regex to include blog/curriculum/play.

Note: Blog and Curriculum aren't available in locales other than en-US, but that is a separate issue.


How did you test this change?

Ran npm i && npm run server:watch in /cloud-function and verified that http://localhost:8080/blog, http://localhost:8080/curriculum and http://localhost:8080/play redirect.

Also removes signin/signup, which are obsolete.
@caugner caugner requested a review from a team as a code owner March 5, 2024 15:49
@github-actions github-actions bot added redirects all things related to redirecting cloud-function labels Mar 5, 2024
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 👍🏻

@caugner caugner merged commit 2fe9d54 into main Mar 5, 2024
12 checks passed
@caugner caugner deleted the redirect-blog-curriculum-play-without-locale branch March 5, 2024 17:45
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.

2 participants