From 11c13e435bb2817ae1615077f3986822238e3c42 Mon Sep 17 00:00:00 2001 From: YassinEldeeb Date: Thu, 28 Mar 2024 16:23:12 +0200 Subject: [PATCH 1/2] fix swapi --- next.config.js | 8 ++++++++ vercel.json | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/next.config.js b/next.config.js index 5640910b6d..ded8c564b1 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/", From ee444421d115a68ea7d0a643ed9225ed255288d2 Mon Sep 17 00:00:00 2001 From: YassinEldeeb Date: Thu, 28 Mar 2024 16:25:25 +0200 Subject: [PATCH 2/2] chore: prettier --- next.config.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/next.config.js b/next.config.js index ded8c564b1..cda70c2ee1 100644 --- a/next.config.js +++ b/next.config.js @@ -45,12 +45,12 @@ export default withLess( // 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*', - }, - ] - }, + return [ + { + source: "/swapi-graphql/:path*", + destination: "https://graphql.github.io/swapi-graphql/:path*", + }, + ] + }, }), )