UNPKG

astro

Version:

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

15 lines (14 loc) 452 B
function redirectTemplate({ status, location, from }) { const delay = status === 302 ? 2 : 0; return `<!doctype html> <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 };