Skip to content

Commit

Permalink
25 - 404 Handler: Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
andreituicu committed Apr 22, 2024
1 parent 3d8b353 commit 8c261fe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,19 @@
locale = `/${match[1]}`;
}
const snowErrorPage = `https://servicenow.com${locale}/page-not-found.html`;
if (window.location.pathname.endsWith('/test404') && // canary to test in the prod domain
(window.location.hostname.endsWith('.servicenow.com') || window.location.hostname === 'servicenow.com')) {
if (window.location.hostname.endsWith('.servicenow.com') || window.location.hostname === 'servicenow.com') {
document.body.innerHTML = '';
const iframe = document.createElement('iframe');
iframe.id = 'snow-error-frame';
iframe.src = snowErrorPage;
document.body.appendChild(iframe);
} else {
window.location.href = snowErrorPage;
}
});
</script>
</head>

<body>
Not found
Page Not Found
</body>

</html>

0 comments on commit 8c261fe

Please sign in to comment.