JavaScript Examples - Respond with Another Site

Respond to the request with a response from another website. Useful for temporary redirects.

addEventListener("fetch", event => {
return event.respondWith(
fetch("https://azion.com")
)
})

Contributors