Fix Vercel routing: separate API and static file routes
This commit is contained in:
14
vercel.json
14
vercel.json
@@ -8,8 +8,20 @@
|
|||||||
],
|
],
|
||||||
"routes": [
|
"routes": [
|
||||||
{
|
{
|
||||||
"src": "/(.*)",
|
"src": "/api/(.*)",
|
||||||
"dest": "/api/simple.js"
|
"dest": "/api/simple.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/health",
|
||||||
|
"dest": "/api/simple.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/(.*\\.(html|css|js|json|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot))",
|
||||||
|
"dest": "/$1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/(.*)",
|
||||||
|
"dest": "/index.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
|
Reference in New Issue
Block a user