Skip to content

Commit 4de6467

Browse files
committed
requested changes
1 parent fb4846c commit 4de6467

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

next.config.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ const permanentRedirectArray = [
134134
["/guides", "/price-feeds"],
135135
];
136136

137+
const temperoryRedirectsArray = [
138+
[
139+
"/price-feeds/api-reference/evm/:slug*",
140+
"https://api-reference.pyth.network/price-feeds/evm/:slug*",
141+
],
142+
];
143+
137144
/** @type {import('next').NextConfig} */
138145
const nextConfig = {
139146
reactStrictMode: true,
@@ -144,14 +151,25 @@ const nextConfig = {
144151
config.resolve.fallback = { fs: false, net: false, tls: false };
145152
return config;
146153
},
154+
147155
async redirects() {
148-
return permanentRedirectArray.map((value) => {
156+
permanentRedirects = permanentRedirectArray.map((value) => {
149157
return {
150158
source: value[0],
151159
destination: value[1],
152160
permanent: true,
153161
};
154162
});
163+
164+
temperoryRedirects = temperoryRedirectsArray.map((value) => {
165+
return {
166+
source: value[0],
167+
destination: value[1],
168+
permanent: false,
169+
};
170+
});
171+
172+
return [...permanentRedirects, ...temperoryRedirects];
155173
},
156174
};
157175

package-lock.json

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)