mirror of
https://github.com/JonasunderscoreJones/api-worker.git
synced 2025-10-23 10:29:19 +02:00
9 lines
354 B
TypeScript
9 lines
354 B
TypeScript
// This Worker is used as a default when no Pages Functions are present.
|
|
// It proxies the request directly on to the asset server binding.
|
|
|
|
export default <ExportedHandler<{ ASSETS: Fetcher }>>{
|
|
async fetch(request, env, context) {
|
|
const response = await env.ASSETS.fetch(request.url, request);
|
|
return new Response(response.body, response);
|
|
},
|
|
};
|