I have deployed my Vite + Vue3 BitBucket project to Netlify but I am having a problem making an API call.
Instead of sending a request to my api (e.g. foo.bar/api/) It’s sending it through Netlify (e.g. glittery-gelato-aa8769.netlify.com/api/).
I have tried creating a _redirect file with no luck and I don’t seem to have a netlify.toml file anywhere within the repo. I am getting a 404 response with the URL going to Netlify instead of my API. This works perfectly fine on localhost with my Vite config file handling the proxy.
How can I make it so this doesn’t happen? Thank you.
As I mentioned, and as stated in the documentation, the _redirects file needs to go into the publish directory. If you are using a Vue project, put it in the public directory so it is copied to the publish directory during build.