Home

Issue: 2240

Route with param returns 404 on refresh

[issue link]

I’m using the Express + Nuxt.js starter template. My routes without params works just as they should, but my routes with params doesn’t work as soon as I refresh the page - it’ll return a 404 response.

I have tried with regular Promise too.

My code is:

async asyncData({ params }) {
	let { data } = await axios.get(`/api/product/${params.slug}`)
	return { data: data.entries[0] }
},
This question is available on Nuxt.js community (#c1969)