impress-2020/next.config.js
Emi Matchu 067da33025 Replace trades pages with redirects to Classic DTI
The immediate motivation here is that there's slowness rn, and I'm
digging through the slow query log for suspicious targets (hard to tell
when even normal queries are getting slowed down by whatever the
culprit is!), and Impress 2020's constantly-recalcuated trade activity
dates were one of them.

So, rather than update this page to use the new table columns Classic
now uses, I figured, let's Delete Things and reduce surface area. The
re-merge continues!

If we're lucky, this change alone will stop the bursts of slowness. If
not, we'll keep looking for suspicious targets!
2024-09-30 11:49:10 -07:00

45 lines
1.2 KiB
JavaScript

module.exports = {
reactStrictMode: true,
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",
},
{
source: "/asset-images/:type/:x1/:x2/:x3/:remoteId/:idealSize.png",
destination:
"/api/assetImageRedirect?idealSize=:idealSize&type=:type&remoteId=:remoteId",
},
];
},
async redirects() {
return [
{
source: "/user/:userId/closet",
destination: "/user/:userId/lists",
permanent: true,
},
{
source: "/user/:userId/items",
destination: "/user/:userId/lists",
permanent: true,
},
{
source: "/items/:itemId/trades/offering",
destination:
"https://impress.openneo.net/items/:itemId/trades/offering",
permanent: true,
},
{
source: "/items/:itemId/trades/seeking",
destination: "https://impress.openneo.net/items/:itemId/trades/seeking",
permanent: true,
},
];
},
};