- Welcome to Azion Docs
- Edge Application
- Edge Functions
- Edge Functions - JavaScript Examples
- JavaScript Examples - Respond with Another Site
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")
)
})
Didn’t find what you were looking for? Open a support ticket.