From 52526c09e8e5fb8c3a25670f2d060da152a0e333 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 1 Nov 2021 22:33:23 -0700 Subject: [PATCH] [WIP] Move redirects to Next config --- next.config.js | 14 ++++++++++++++ vercel.json | 5 ----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/next.config.js b/next.config.js index 1c289bd..252c3e3 100644 --- a/next.config.js +++ b/next.config.js @@ -2,4 +2,18 @@ module.exports = { env: { PUBLIC_URL: "", }, + async redirects() { + return [ + { + source: "/user/:userId/closet", + destination: "/user/:userId/lists", + permanent: true, + }, + { + source: "/user/:userId/items", + destination: "/user/:userId/lists", + permanent: true, + }, + ]; + }, }; diff --git a/vercel.json b/vercel.json index bb1976f..69b26d9 100644 --- a/vercel.json +++ b/vercel.json @@ -1,10 +1,5 @@ { "routes": [ - { - "src": "/user/(?[^/]+)/(closet|items)", - "status": 308, - "headers": { "Location": "/user/$userId/lists" } - }, { "src": "/outfits/(?[^/]+)/(?150|300|600)\\.png", "dest": "/api/outfitImage.js?size=$size&id=$id"