Kind: Function
Source: atloria-monorepo/apps/web/src/app/p/[slugId]/pages/[slug]/route.ts
Same-origin markdown for one published page: /p/
Every entry in llms.txt points at one of these, and until now every one of them 404'd into the
SPA shell — an agent following our own discovery index received 25 KB of HTML with a 200 and
a text/html content type, which is worse than a clean failure because nothing looks broken.
The API served the markdown correctly the whole time; nothing on the published origin routed
to it.
Proxied rather than redirected, for the same reason llms.txt is: an agent should never have to follow a hop to a different origin, and the API attributes the read to the real crawler.
Signature
tsasync function GET(req: Request, ctx: { params: Promise<{ slugId: string; slug: string }> })
Parameters
| Name | Type |
|---|---|
req | Request |
ctx | { params: Promise<{ slugId: string; slug: string }> } |
Was this page helpful?