Skip to content

Commit f1f07bf

Browse files
committed
requested changes
1 parent 4de6467 commit f1f07bf

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

next.config.js

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ const permanentRedirectArray = [
118118
["/documentation", "/home"],
119119

120120
["/api-explorer/:slug*", "/price-feeds/api-reference/:slug*"],
121-
[
122-
"/price-feeds/api-reference/evm/:slug*",
123-
"https://api-reference.pyth.network/price-feeds/evm/:slug*",
124-
],
125121

126122
[
127123
"/guides/how-to-schedule-price-updates-with-gelato",
@@ -134,13 +130,6 @@ const permanentRedirectArray = [
134130
["/guides", "/price-feeds"],
135131
];
136132

137-
const temperoryRedirectsArray = [
138-
[
139-
"/price-feeds/api-reference/evm/:slug*",
140-
"https://api-reference.pyth.network/price-feeds/evm/:slug*",
141-
],
142-
];
143-
144133
/** @type {import('next').NextConfig} */
145134
const nextConfig = {
146135
reactStrictMode: true,
@@ -153,23 +142,28 @@ const nextConfig = {
153142
},
154143

155144
async redirects() {
156-
permanentRedirects = permanentRedirectArray.map((value) => {
145+
const permanentRedirects = permanentRedirectArray.map((value) => {
157146
return {
158147
source: value[0],
159148
destination: value[1],
160149
permanent: true,
161150
};
162151
});
163152

164-
temperoryRedirects = temperoryRedirectsArray.map((value) => {
165-
return {
166-
source: value[0],
167-
destination: value[1],
153+
return [
154+
...permanentRedirects,
155+
{
156+
source: "/price-feeds/api-reference/evm/:slug",
157+
destination:
158+
"https://api-reference.pyth.network/price-feeds/evm/:slug",
168159
permanent: false,
169-
};
170-
});
171-
172-
return [...permanentRedirects, ...temperoryRedirects];
160+
},
161+
{
162+
source: "/price-feeds/api-reference/evm/",
163+
destination: "https://api-reference.pyth.network/price-feeds/evm/",
164+
permanent: false,
165+
},
166+
];
173167
},
174168
};
175169

0 commit comments

Comments
 (0)