Netlify problem with external api(both work locally)
Hello i just deployed from my github that has both server and client folders

backend api: (for example)

My site loads fine except for the api(locally i run it fine it displays all api results)
i get error in console:

message: “Request failed with status code 404”, name: “AxiosError”, code: “ERR_BAD_REQUEST”, config: {…}, request: XMLHttpRequest, response: {…} }
config: Object { timeout: 0, xsrfCookieName: “XSRF-TOKEN”, xsrfHeaderName: “X-XSRF-TOKEN”, … }
message: “Request failed with status code 404”
name: “AxiosError”

this is my vite.config:
import { defineConfig } from ‘vite’
import react from ‘@vitejs/plugin-react’

// Configuring Vite | Vite
export default defineConfig({
plugins: [react()],
server: {
proxy: {
‘/api’: {
target: ‘’,
changeOrigin: true,
secure: false,
ws: true

Can you help please?

Found the solution. I needed to add _redirects file to public folder in my vite project
and add the following line:
/api/* 200

oh that’s awesome! Thanks for sharing your solution with the community. :netliheart: