Skip to content

Commit fb20d6d

Browse files
committed
refactor: update Vercel configuration to use rewrites instead of routes
- Removed the builds and routes sections from vercel.json. - Added a rewrites section to direct traffic to the API entry point. - Cleaned up CORS headers configuration.
1 parent d9c7278 commit fb20d6d

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

vercel.json

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
{
2-
"version": 2,
3-
"builds": [
4-
{
5-
"src": "api/entrypoint.go",
6-
"use": "@vercel/go"
7-
}
8-
],
9-
"routes": [
10-
{
11-
"src": "/(.*)",
12-
"dest": "/api/entrypoint.go"
13-
}
14-
],
152
"headers": [
163
{
174
"source": "/(.*)",
185
"headers": [
196
{
207
"key": "Access-Control-Allow-Origin",
218
"value": "*"
22-
},
23-
{
24-
"key": "Access-Control-Allow-Methods",
25-
"value": "GET, POST, PUT, DELETE, OPTIONS"
26-
},
27-
{
28-
"key": "Access-Control-Allow-Headers",
29-
"value": "Content-Type, Authorization"
309
}
3110
]
3211
}
12+
],
13+
"rewrites": [
14+
{
15+
"source": "/(.*)",
16+
"destination": "/api/entrypoint.go"
17+
}
3318
]
3419
}

0 commit comments

Comments
 (0)