i have a custom builder for building pages to public directory. and i put markdown files in '_markdown' directory, which should be accessible by url https://www.qxel.in/_markdown/about and https://www.qxel.in/_markdown/about.md etc. and I've set up rewrite rule pointing to /_markdown/ for head text/markdown to serve Ai the contents. currently when i access the markdown page with .md extension it serves the file properly. but when i access https://www.qxel.in/about using curl text/markdown it accepts the request but sends the html content instead of markdown. which means the rewrite rule is working perfectly for accepting markdown but serving html content. this is vercel.json
{ "$schema": "https://openapi.vercel.sh/vercel.json",
"headers": [ { "source": "/:path*", "has": [ { "type": "header", "key": "accept", "value": ".*text/markdown.*" } ], "headers": [ { "key": "Content-Type", "value": "text/markdown; charset=utf-8" }, { "key": "Vary", "value": "Accept" } ] }, { "source": "/(.*)", "headers": [ { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate, proxy-revalidate" }, { "key": "Strict-Transport-Security", "value": "max-age=31536000; includeSubDomains; preload" }, { "key": "X-Frame-Options", "value": "DENY" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }, { "key": "Permissions-Policy", "value": "geolocation=(), microphone=(), camera=(), payment=(), usb=(), screen-wake-lock=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=()" } ] } ],
"rewrites": [ { "source": "/", "has": [ { "type": "header", "key": "accept", "value": ".*text/markdown.*" } ], "destination": "/_markdown/index.md" }, { "source": "/:path*", "has": [ { "type": "header", "key": "accept", "value": ".*text/markdown.*" } ], "destination": "/_markdown/:path*.md" } ],
"cleanUrls": true,
"github": { "autoJobCancelation": true },
"git": { "deploymentEnabled": { "main": true } }}