pages-shim.ts 354 B

123456789
  1. // This Worker is used as a default when no Pages Functions are present.
  2. // It proxies the request directly on to the asset server binding.
  3. export default <ExportedHandler<{ ASSETS: Fetcher }>>{
  4. async fetch(request, env, context) {
  5. const response = await env.ASSETS.fetch(request.url, request);
  6. return new Response(response.body, response);
  7. },
  8. };