Skip to content

Commit bfd36bd

Browse files
authored
Update custom-routes-proxying to use fallback rewrites (#23610)
This updates to use the new `fallback` rewrites support instead of the previous no-op rewrite workaround. ## Documentation / Examples - [x] Make sure the linting passes
1 parent ba81b6a commit bfd36bd

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
module.exports = {
22
async rewrites() {
3-
return [
4-
// we need to define a no-op rewrite to trigger checking
5-
// all pages/static files before we attempt proxying
6-
{
7-
source: '/:path*',
8-
destination: '/:path*',
9-
},
10-
{
11-
source: '/:path*',
12-
destination: `https://custom-routes-proxying-endpoint.vercel.app/:path*`,
13-
},
14-
]
3+
return {
4+
fallback: [
5+
{
6+
source: '/:path*',
7+
destination: `https://custom-routes-proxying-endpoint.vercel.app/:path*`,
8+
},
9+
],
10+
}
1511
},
1612
}

0 commit comments

Comments
 (0)