diff --git a/www/apps/book/next.config.mjs b/www/apps/book/next.config.mjs index 53d2381551..b27ce24cec 100644 --- a/www/apps/book/next.config.mjs +++ b/www/apps/book/next.config.mjs @@ -122,23 +122,12 @@ const nextConfig = { destination: "/md-content/:path*", }, { - source: "/:path*", + source: "/:path((?!resources|api|ui|user-guide|cloud).*)*", has: [ { type: "header", key: "Accept", - value: "text/markdown", - }, - ], - destination: "/md-content/:path*", - }, - { - source: "/:path*", - has: [ - { - type: "header", - key: "Accept", - value: "text/plain", + value: ".*(text/markdown|text/plain).*", }, ], destination: "/md-content/:path*", diff --git a/www/apps/cloud/next.config.mjs b/www/apps/cloud/next.config.mjs index 865a5f763e..5e6a501c84 100644 --- a/www/apps/cloud/next.config.mjs +++ b/www/apps/cloud/next.config.mjs @@ -164,23 +164,12 @@ const nextConfig = { has: [ { type: "header", - key: "accept", - value: "text/markdown", + key: "Accept", + value: ".*(text/markdown|text/plain).*", }, ], destination: "/md-content/:path*", }, - { - source: "/:path*", - destination: "/md-content/:path*", - has: [ - { - type: "header", - key: "accept", - value: "text/plain", - }, - ], - }, ], } }, diff --git a/www/apps/resources/next.config.mjs b/www/apps/resources/next.config.mjs index 7fbca316f0..63cae9f50e 100644 --- a/www/apps/resources/next.config.mjs +++ b/www/apps/resources/next.config.mjs @@ -298,23 +298,12 @@ const nextConfig = { has: [ { type: "header", - key: "accept", - value: "text/markdown", + key: "Accept", + value: ".*(text/markdown|text/plain).*", }, ], destination: "/md-content/:path*", }, - { - source: "/:path*", - destination: "/md-content/:path*", - has: [ - { - type: "header", - key: "accept", - value: "text/plain", - }, - ], - }, ], } }, diff --git a/www/apps/ui/next.config.mjs b/www/apps/ui/next.config.mjs index 0dfcbef752..8d877116b9 100644 --- a/www/apps/ui/next.config.mjs +++ b/www/apps/ui/next.config.mjs @@ -153,23 +153,12 @@ const nextConfig = { has: [ { type: "header", - key: "accept", - value: "text/markdown", + key: "Accept", + value: ".*(text/markdown|text/plain).*", }, ], destination: "/md-content/:path*", }, - { - source: "/:path*", - destination: "/md-content/:path*", - has: [ - { - type: "header", - key: "accept", - value: "text/plain", - }, - ], - }, ], } }, diff --git a/www/apps/user-guide/next.config.mjs b/www/apps/user-guide/next.config.mjs index 1f1eae4180..6d78898760 100644 --- a/www/apps/user-guide/next.config.mjs +++ b/www/apps/user-guide/next.config.mjs @@ -141,23 +141,12 @@ const nextConfig = { has: [ { type: "header", - key: "accept", - value: "text/markdown", + key: "Accept", + value: ".*(text/markdown|text/plain).*", }, ], destination: "/md-content/:path*", }, - { - source: "/:path*", - destination: "/md-content/:path*", - has: [ - { - type: "header", - key: "accept", - value: "text/plain", - }, - ], - }, ], } },