astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
15 lines (14 loc) • 452 B
JavaScript
function redirectTemplate({ status, location, from }) {
const delay = status === 302 ? 2 : 0;
return `<title>Redirecting to: ${location}</title>
<meta http-equiv="refresh" content="${delay};url=${location}">
<meta name="robots" content="noindex">
<link rel="canonical" href="${location}">
<body>
<a href="${location}">Redirecting from <code>${from}</code> to <code>${location}</code></a>
</body>`;
}
export {
redirectTemplate
};