Http cancellation with Vite proxy server not picked up by backend

I've been trying to figure out why my backend wont' pick up http reqs canceled by the frontend, and I've realized that it is because of Vite proxy server:
export default defineConfig({
plugins: [react(), mkcert()],
build: {
outDir: "../server/server/dist",
emptyOutDir: true,
},
base: "/",
resolve: {
alias: {
"@": "/src",
},
},
server: {
open: true,
port: 3000,
proxy: {
"^/api": {
target: devProxyServer,
changeOrigin: true,
},
},
},
});
export default defineConfig({
plugins: [react(), mkcert()],
build: {
outDir: "../server/server/dist",
emptyOutDir: true,
},
base: "/",
resolve: {
alias: {
"@": "/src",
},
},
server: {
open: true,
port: 3000,
proxy: {
"^/api": {
target: devProxyServer,
changeOrigin: true,
},
},
},
});
This only happens in dev locally, as the frontend is hosted in the backend in prod, but has anyone else encountered the same thing and able to give some pointers? I'm at the point where I just want to figure it out 😛 PS: Calling fetch with the absolute path to the backend works (backend picks it up), but not something we can do 😦
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server