Browse Source

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

Connor Prussin 1 năm trước cách đây
mục cha
commit
14c5cba8d5
1 tập tin đã thay đổi với 15 bổ sung9 xóa
  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,
+    },
+  ],
 };