Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
['dk', '/'],
['it', '/'],
['br', '/'],
['cn', '/'],
['de', '/'],
['es', '/'],
['fi', '/'],
Expand All @@ -119,7 +118,6 @@
['vn_en', '/'],
['vn_vi', '/'],
['za', '/'],
['zh-Hans-CN', '/cn/' ],
['zh-Hant-TW', '/tw/'],
]
);
Expand Down
5 changes: 3 additions & 2 deletions express/code/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,10 @@ async function loadPage() {
import('./instrument.js').then((mod) => { mod.default(); });
}

/* region based redirect to homepage */
/* region based redirect to CN homepage */
const isAdobeOrigin = /^(www\.stage\.|www\.)adobe\.com$/.test(window.location.hostname);
import('./utils/location-utils.js').then(({ getCountry }) => getCountry()).then((country) => {
if (country === 'cn') { window.location.href = '/cn'; }
if (country === 'cn' && isAdobeOrigin && !window.location.pathname.startsWith('/cn') && !window.isErrorPage) { window.location.href = '/cn'; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (country === 'cn' && isAdobeOrigin && !window.location.pathname.startsWith('/cn') && !window.isErrorPage) { window.location.href = '/cn'; }
if (country === 'cn' && isAdobeOrigin && !window.location.pathname.startsWith('/cn') && !window.isErrorPage) { window.location.href = '/cn'; }
}).catch((err) => {
window.lana?.log(`CN redirect failed: ${err}`, { tags: 'scripts', severity: 'error' });
});

});

document.head.querySelectorAll('meta').forEach((meta) => {
Expand Down
Loading