Functions redirect does not work in production

Hello folks,

I have an SPA and when I set redirects for functions it works fine on netlify dev locally with Vue dev server proxy, but when deployed requests made to "/gate/<function_name> return index.html. Requests to "/.netlify/functions/<function_name> work fine.

Heres the redirect rules I use.

  from = "/gate/*"
  to = "/.netlify/functions/:splat"
  status = 200
  query = {path = ":path"} 

  from = "/*"
  to = "/index.html"
  status = 200

Any ideas where to look to fix that?

Many thanks in advance!


Switching over to _redirects works fine. Rules from netlify.toml still do not work.

interesting - I would expect them to work from either source. Glad to hear you got them working though!