impress-2020/next.config.js
Matchu 30d582a9c4 Re-add support for nice outfit image URLs
We removed this earlier in 7205455ccb, but now it's time to re-add it!
2021-11-12 19:53:34 -08:00

31 lines
696 B
JavaScript

module.exports = {
env: {
PUBLIC_URL: "",
},
async rewrites() {
return [
{
source: "/outfits/:id/:size(150|300|600).png",
destination: "/api/outfitImage?size=:size&id=:id",
},
{
source: "/outfits/:id/v/:updatedAt/:size(150|300|600).png",
destination: "/api/outfitImage?size=:size&id=:id&updatedAt=:updatedAt",
},
];
},
async redirects() {
return [
{
source: "/user/:userId/closet",
destination: "/user/:userId/lists",
permanent: true,
},
{
source: "/user/:userId/items",
destination: "/user/:userId/lists",
permanent: true,
},
];
},
};