diff --git a/next.config.js b/next.config.js index 5640910b6d..cda70c2ee1 100644 --- a/next.config.js +++ b/next.config.js @@ -44,5 +44,13 @@ export default withLess( // `statusCode` is not undefined or valid statusCode for route {"source":"/swapi-graphql/:path*","destination":"https://graphql.github.io/swapi-graphql/:path*","statusCode":200} // Valid redirect statusCode values are 301, 302, 303, 307, 308 redirects: () => vercelJSON.redirects.filter(o => o.statusCode !== 200), + async rewrites() { + return [ + { + source: "/swapi-graphql/:path*", + destination: "https://graphql.github.io/swapi-graphql/:path*", + }, + ] + }, }), ) diff --git a/vercel.json b/vercel.json index b281fd113a..dc274ee644 100644 --- a/vercel.json +++ b/vercel.json @@ -10,11 +10,6 @@ "destination": "/conf/2023/schedule", "permanent": false }, - { - "source": "/swapi-graphql/:path*", - "destination": "https://graphql.github.io/swapi-graphql/:path*", - "statusCode": 200 - }, { "source": "/docs/api-reference-errors", "destination": "/graphql-js/error/",