Vite App after deploying on vercel refreshing does not work
Unanswered
American black bear posted this in #help-forum
American black bearOP
I have frontend in Vite React and backend in Spring-Boot deployed on AWS. I made proxy on vite reffering to my backend and after deploy on vercel created
vercel.json file and made rewrite to my backend. The problem is after refresh my website it print NOT FOUND ERROR and idk basicly why.11 Replies
American black bearOP
//vite.config.ts proxy
server: {
proxy: {
'/accounts': {
target: 'http://ec2-xx-xxx-xxx-xxx.eu-north-1.compute.amazonaws.com:8000',
changeOrigin: true,
},
'/api': 'http://ec2-xx-xxx-xxx-xxx.eu-north-1.compute.amazonaws.com:8000'
},// vite.json
{
"rewrites": [
{
"source": "/accounts/:path*",
"destination": "http://ec2-xx-xxx-xxx-xxx.eu-north-1.compute.amazonaws.com:8000/accounts/:path*"
},
{
"source": "/api/:path*",
"destination": "http://ec2-xx-xxx-xxx-xxx.eu-north-1.compute.amazonaws.com:8000/api/:path*"
}
]
}
One detail it prints not found only on my authorized endpoints when I require to be logged
after refresh my authorized tasks it could manage a lot of requests
but locally it works and on vercel it does not
based on that problem is maybe with react router?
but locally it works
only on vercel I have that problem
American black bearOP
nobody?
American black bearOP
.