docs: fix rewrites for markdown and plain content (#13916)
This commit is contained in:
@@ -122,23 +122,12 @@ const nextConfig = {
|
|||||||
destination: "/md-content/:path*",
|
destination: "/md-content/:path*",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: "/:path*",
|
source: "/:path((?!resources|api|ui|user-guide|cloud).*)*",
|
||||||
has: [
|
has: [
|
||||||
{
|
{
|
||||||
type: "header",
|
type: "header",
|
||||||
key: "Accept",
|
key: "Accept",
|
||||||
value: "text/markdown",
|
value: ".*(text/markdown|text/plain).*",
|
||||||
},
|
|
||||||
],
|
|
||||||
destination: "/md-content/:path*",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: "/:path*",
|
|
||||||
has: [
|
|
||||||
{
|
|
||||||
type: "header",
|
|
||||||
key: "Accept",
|
|
||||||
value: "text/plain",
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
destination: "/md-content/:path*",
|
destination: "/md-content/:path*",
|
||||||
|
|||||||
@@ -164,23 +164,12 @@ const nextConfig = {
|
|||||||
has: [
|
has: [
|
||||||
{
|
{
|
||||||
type: "header",
|
type: "header",
|
||||||
key: "accept",
|
key: "Accept",
|
||||||
value: "text/markdown",
|
value: ".*(text/markdown|text/plain).*",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
destination: "/md-content/:path*",
|
destination: "/md-content/:path*",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: "/:path*",
|
|
||||||
destination: "/md-content/:path*",
|
|
||||||
has: [
|
|
||||||
{
|
|
||||||
type: "header",
|
|
||||||
key: "accept",
|
|
||||||
value: "text/plain",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -298,23 +298,12 @@ const nextConfig = {
|
|||||||
has: [
|
has: [
|
||||||
{
|
{
|
||||||
type: "header",
|
type: "header",
|
||||||
key: "accept",
|
key: "Accept",
|
||||||
value: "text/markdown",
|
value: ".*(text/markdown|text/plain).*",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
destination: "/md-content/:path*",
|
destination: "/md-content/:path*",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: "/:path*",
|
|
||||||
destination: "/md-content/:path*",
|
|
||||||
has: [
|
|
||||||
{
|
|
||||||
type: "header",
|
|
||||||
key: "accept",
|
|
||||||
value: "text/plain",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -153,23 +153,12 @@ const nextConfig = {
|
|||||||
has: [
|
has: [
|
||||||
{
|
{
|
||||||
type: "header",
|
type: "header",
|
||||||
key: "accept",
|
key: "Accept",
|
||||||
value: "text/markdown",
|
value: ".*(text/markdown|text/plain).*",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
destination: "/md-content/:path*",
|
destination: "/md-content/:path*",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: "/:path*",
|
|
||||||
destination: "/md-content/:path*",
|
|
||||||
has: [
|
|
||||||
{
|
|
||||||
type: "header",
|
|
||||||
key: "accept",
|
|
||||||
value: "text/plain",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -141,23 +141,12 @@ const nextConfig = {
|
|||||||
has: [
|
has: [
|
||||||
{
|
{
|
||||||
type: "header",
|
type: "header",
|
||||||
key: "accept",
|
key: "Accept",
|
||||||
value: "text/markdown",
|
value: ".*(text/markdown|text/plain).*",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
destination: "/md-content/:path*",
|
destination: "/md-content/:path*",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: "/:path*",
|
|
||||||
destination: "/md-content/:path*",
|
|
||||||
has: [
|
|
||||||
{
|
|
||||||
type: "header",
|
|
||||||
key: "accept",
|
|
||||||
value: "text/plain",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user