Skip to content

fix(cloud-function): respect Accept-Language: zh-TW#323

Merged
LeoMcA merged 2 commits intomainfrom
321-locale-redirect-with-zh-TW
May 1, 2026
Merged

fix(cloud-function): respect Accept-Language: zh-TW#323
LeoMcA merged 2 commits intomainfrom
321-locale-redirect-with-zh-TW

Conversation

@caugner
Copy link
Copy Markdown
Contributor

@caugner caugner commented Apr 30, 2026

Description

Updates the locale redirect to honor Accept-Language: zh-TW, by trying a strict language pick first, before falling back to a loose language pick.

Motivation

Fix content negotiation bug where this caused a redirect to zh-CN.

Additional details

Related issues and pull requests

Fixes #321.

caugner added 2 commits April 30, 2026 12:51
Includes a failing test for `Accept-Language: zh-TW`, which
currently redirects to `zh-CN`, but should redirect to `zh-TW`.
@caugner caugner marked this pull request as ready for review April 30, 2026 10:59
@caugner caugner requested a review from a team as a code owner April 30, 2026 10:59
@caugner caugner requested a review from LeoMcA April 30, 2026 10:59
@LeoMcA LeoMcA merged commit 27fe1bc into main May 1, 2026
6 checks passed
@LeoMcA LeoMcA deleted the 321-locale-redirect-with-zh-TW branch May 1, 2026 10:33
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.

Accept-Language: zh-TW redirects to /zh-CN/

3 participants