handlePrerenderRequest() — astro Function Reference
Architecture documentation for the handlePrerenderRequest() function in prerender.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0bc4518a_af0f_0568_94c4_9255ce2f0efd["handlePrerenderRequest()"] 48b50da0_daf1_dfed_c56f_65e6f20889c9["prerender.ts"] 0bc4518a_af0f_0568_94c4_9255ce2f0efd -->|defined in| 48b50da0_daf1_dfed_c56f_65e6f20889c9 style 0bc4518a_af0f_0568_94c4_9255ce2f0efd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/cloudflare/src/utils/prerender.ts lines 61–73
export async function handlePrerenderRequest(app: BaseApp, request: Request): Promise<Response> {
const headers = new Headers();
for (const [key, value] of request.headers.entries()) {
headers.append(key, value);
}
const body: PrerenderRequest = await request.json();
const routeData = deserializeRouteData(body.routeData);
const prerenderRequest = new Request(body.url, {
method: 'GET',
headers,
});
return app.render(prerenderRequest, { routeData });
}
Domain
Subdomains
Source
Frequently Asked Questions
What does handlePrerenderRequest() do?
handlePrerenderRequest() is a function in the astro codebase, defined in packages/integrations/cloudflare/src/utils/prerender.ts.
Where is handlePrerenderRequest() defined?
handlePrerenderRequest() is defined in packages/integrations/cloudflare/src/utils/prerender.ts at line 61.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free