Hi all, I hope someone can help with this - after checking the redirect guide and following an example Netlify web app I still cannot get redirects to work in my Nuxt 3 app - specifically redirects to serverless functions.
I have added a basic redirect from /api/*
to /.Netlify/functions/:splat
.
I suspect the Nuxt deployment includes a SPA redirect that is executed before my redirect.
The evidence for this is that the deploy log reports that three redirects were processed, and my netlify.toml
file only has two:
3 redirect rules processed
All redirect rules deployed without errors.
[[redirects]]
force = true
from = "/api/*"
to = "/.netlify/functions/:splat"
[[redirects]]
from = "/*"
status = 200
to = "/index.html"
I have tried to download my deployed site but I only get a “Error during download” message.
I have tried to test the redirects when running functions locally and that does not work either. The functions runtime returns a “Cannot GET /api/entity” regardless of redirect rules in my Netlify.Toml
file.
What should I look at next? I would like to find out where the Nuxt SPA redirect ends up post-deployment, and how I should mix in my specific redirect.