'301 redirect in NuxtJS

I am trying to work out a way to make 301 redirects in NuxtJS. Is there a way to use router push and make it act/perform like a 301?

I currently have this

this.$router.push(`/${this.res.goTo}`);

in my mounted() function, this is good but it does not tell the browser it's a 301 (network tab)

Now, is there a way to redirect to another page and tell the browser it's a 301?

Using nuxtjs with SSR.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source