11 lines
419 B
TypeScript
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])
|
|
);
|