this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

handle /_next/image

+6 -5
+6 -5
builder/src/build/build-worker/templates/worker.ts
··· 36 36 const url = new URL(request.url); 37 37 38 38 if (url.pathname === "/_next/image") { 39 - // TODO: not implemented 40 - return fetch( 39 + let imageUrl = 41 40 url.searchParams.get("url") ?? 42 - "https://developers.cloudflare.com/_astro/logo.BU9hiExz.svg", 43 - { cf: { cacheEverything: true } } as any 44 - ); 41 + "https://developers.cloudflare.com/_astro/logo.BU9hiExz.svg"; 42 + if (imageUrl.startsWith("/")) { 43 + imageUrl = new URL(imageUrl, request.url).href; 44 + } 45 + return fetch(imageUrl, { cf: { cacheEverything: true } } as any); 45 46 } 46 47 47 48 const resBody = new TransformStream();