@@ -118,10 +118,6 @@ const permanentRedirectArray = [
118
118
[ "/documentation" , "/home" ] ,
119
119
120
120
[ "/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
- ] ,
125
121
126
122
[
127
123
"/guides/how-to-schedule-price-updates-with-gelato" ,
@@ -134,13 +130,6 @@ const permanentRedirectArray = [
134
130
[ "/guides" , "/price-feeds" ] ,
135
131
] ;
136
132
137
- const temperoryRedirectsArray = [
138
- [
139
- "/price-feeds/api-reference/evm/:slug*" ,
140
- "https://api-reference.pyth.network/price-feeds/evm/:slug*" ,
141
- ] ,
142
- ] ;
143
-
144
133
/** @type {import('next').NextConfig } */
145
134
const nextConfig = {
146
135
reactStrictMode : true ,
@@ -153,23 +142,28 @@ const nextConfig = {
153
142
} ,
154
143
155
144
async redirects ( ) {
156
- permanentRedirects = permanentRedirectArray . map ( ( value ) => {
145
+ const permanentRedirects = permanentRedirectArray . map ( ( value ) => {
157
146
return {
158
147
source : value [ 0 ] ,
159
148
destination : value [ 1 ] ,
160
149
permanent : true ,
161
150
} ;
162
151
} ) ;
163
152
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" ,
168
159
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
+ ] ;
173
167
} ,
174
168
} ;
175
169
0 commit comments