[WIP] Move redirects to Next config

This commit is contained in:
Emi Matchu 2021-11-01 22:33:23 -07:00
parent 8dab442929
commit 52526c09e8
2 changed files with 14 additions and 5 deletions

View file

@ -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,
},
];
},
};

View file

@ -1,10 +1,5 @@
{
"routes": [
{
"src": "/user/(?<userId>[^/]+)/(closet|items)",
"status": 308,
"headers": { "Location": "/user/$userId/lists" }
},
{
"src": "/outfits/(?<id>[^/]+)/(?<size>150|300|600)\\.png",
"dest": "/api/outfitImage.js?size=$size&id=$id"