Skip to content

Commit

Permalink
Vercel json
Browse files Browse the repository at this point in the history
  • Loading branch information
derin-art committed Dec 28, 2022
1 parent da270bb commit 7ba58a7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
24 changes: 22 additions & 2 deletions pages/api/customerChanges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,17 @@ handler
.use(async (req, res, next) => {
await NextCors(req, res, {
// Options
methods: ["GET", "HEAD", "PUT", "PATCH", "POST", "DELETE", "get", "post"],
methods: [
"GET",
"HEAD",
"PUT",
"PATCH",
"POST",
"DELETE",
"get",
"post",
"put",
],
origin: "*",
optionsSuccessStatus: 200, // some legacy browsers (IE11, various SmartTVs) choke on 204
});
Expand Down Expand Up @@ -121,7 +131,17 @@ handler
}
await NextCors(req, res, {
// Options
methods: ["GET", "HEAD", "PUT", "PATCH", "POST", "DELETE", "get", "post"],
methods: [
"GET",
"HEAD",
"PUT",
"PATCH",
"POST",
"DELETE",
"get",
"post",
"put",
],
origin: "*",
optionsSuccessStatus: 200, // some legacy browsers (IE11, various SmartTVs) choke on 204
});
Expand Down
6 changes: 0 additions & 6 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"rewrites": [
{
"source": "/api/:match*",
"destination": "https://api.endpoint.url/:match*"
}
],
"headers": [
{
"source": "/api/(.*)",
Expand Down

1 comment on commit 7ba58a7

@vercel
Copy link

@vercel vercel bot commented on 7ba58a7 Dec 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vert-crud-8d3s – ./

vert-crud-8d3s.vercel.app
vert-crud-8d3s-git-main-derin-art.vercel.app
vert-crud-8d3s-derin-art.vercel.app

Please sign in to comment.