Files
blog-manager/app/img/[...path]/route.ts
2026-11-01 13:23:44 -05:00

11 lines
419 B
TypeScript

import { route } from "@/lib/http";
import { servePublic } from "@/lib/files";
export const dynamic = "force-dynamic";
/** Post bodies link images as /img/...; serve those from the site's public/
* so absolute links resolve in the preview exactly as on the live site. */
export const GET = route<{ params: Promise<{ path: string[] }> }>(async (_req, { params }) =>
servePublic(["img", ...(await params).path])
);