Feature request: Allow redirects to absolute URLs, SSR and client-side.
We have an app (https://domainr.com) with several legacy URLs, some of which redirect to other websites. We’re exploring using Nuxt/Vue for our new website and would like to preserve this behavior.
~/pages/_domain/iana.vue
<script>
export default {
fetch ({ params, redirect }) {
redirect(301, `https://www.iana.org/domains/root/db/${params.domain}.html`)
}
}
</script>
Navigate to /com/iana
Redirect to https://www.iana.org/domains/root/db/com.html
(Click here to see expected behavior: https://domainr.com/com/iana)
Redirect to /https:/www.iana.org/domains/root/db/com.html
(local URL)
Nuxt only allows local redirects to a path, which is prepended with router.base
here: https://github.com/nuxt/nuxt.js/blob/dev/lib/app/server.js#L39