Sfoglia il codice sorgente

feat(staking): add redirect from /test to legacy staking app /test

Connor Prussin 1 anno fa
parent
commit
14c5cba8d5
1 ha cambiato i file con 15 aggiunte e 9 eliminazioni
  1. 15 9
      apps/staking/next.config.js

+ 15 - 9
apps/staking/next.config.js

@@ -53,13 +53,19 @@ export default {
     },
   ],
 
-  async rewrites() {
-    return [
-      {
-        source: "/api/publishers-ranking",
-        destination:
-          "https://web-api.pyth.network/publishers_ranking?cluster=pythnet",
-      },
-    ];
-  },
+  rewrites: () => [
+    {
+      source: "/api/publishers-ranking",
+      destination:
+        "https://web-api.pyth.network/publishers_ranking?cluster=pythnet",
+    },
+  ],
+
+  redirects: () => [
+    {
+      source: "/test",
+      destination: "https://staking-legacy.pyth.network/test",
+      permanent: false,
+    },
+  ],
 };