Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,17 @@ const permanentRedirectArray = [
// Explicitly map legacy lazer paths under /price-feeds to Pro - MUST come before general price-feeds redirects
["/price-feeds/lazer", "/price-feeds/pro"],
["/price-feeds/lazer/:path*", "/price-feeds/pro/:path*"],

["/price-feeds/:path((?!core|pro).*?)", "/price-feeds/core/:path*"],
// some other price feed redirects
["/price-feeds/sponsored-feeds", "/price-feeds/push-feeds"],
[
"/price-feeds/use-real-time-data/:path((?!pull-integration(?:/|$)).*)",
"/price-feeds/use-real-time-data/pull-integration/:path",
Comment on lines +132 to +133
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aditya520 note that this has 2 cases:
http://localhost:3000/price-feeds/use-real-time-data redirects to http://localhost:3000/price-feeds/core/use-real-time-data

and

http://localhost:3000/price-feeds/use-real-time-data/something -> http://localhost:3000/price-feeds/use-real-time-data/pull-integration/something

I'm not sure if that's the intended behaviour

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second one should be

http://localhost:3000/price-feeds/use-real-time-data/something -> http://localhost:3000/price-feeds/core/use-real-time-data/pull-integration/something

],
// generic price feeds redirects
[
"/price-feeds/:path((?!core|pro|push-feeds|use-real-time-data).*?)",
"/price-feeds/core/:path*",
],

["/benchmarks", "/price-feeds/use-historic-price-data"],
[
Expand All @@ -136,13 +145,6 @@ const permanentRedirectArray = [
],
["/benchmarks/api-instances", "/price-feeds/api-reference/"],
["/benchmarks/rate-limits", "/price-feeds/rate-limits/"],

["/price-feeds/sponsored-feeds", "/price-feeds/push-feeds"],

[
"/price-feeds/use-real-time-data/:path((?!pull-integration(?:/|$)).*)",
"/price-feeds/use-real-time-data/pull-integration/:path",
],
];

/** @type {import('next').NextConfig} */
Expand Down
Loading