Skip to content

Commit 0818706

Browse files
authored
fix swapi (#1646)
* fix swapi * chore: prettier
1 parent bd3de5f commit 0818706

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

next.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,13 @@ export default withLess(
4444
// `statusCode` is not undefined or valid statusCode for route {"source":"/swapi-graphql/:path*","destination":"https://graphql.github.io/swapi-graphql/:path*","statusCode":200}
4545
// Valid redirect statusCode values are 301, 302, 303, 307, 308
4646
redirects: () => vercelJSON.redirects.filter(o => o.statusCode !== 200),
47+
async rewrites() {
48+
return [
49+
{
50+
source: "/swapi-graphql/:path*",
51+
destination: "https://graphql.github.io/swapi-graphql/:path*",
52+
},
53+
]
54+
},
4755
}),
4856
)

vercel.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
"destination": "/conf/2023/schedule",
1111
"permanent": false
1212
},
13-
{
14-
"source": "/swapi-graphql/:path*",
15-
"destination": "https://graphql.github.io/swapi-graphql/:path*",
16-
"statusCode": 200
17-
},
1813
{
1914
"source": "/docs/api-reference-errors",
2015
"destination": "/graphql-js/error/",

0 commit comments

Comments
 (0)