diff --git a/Documentation/_worker.js b/Documentation/_worker.js new file mode 100644 index 00000000..0ed5ca33 --- /dev/null +++ b/Documentation/_worker.js @@ -0,0 +1,14 @@ +export default { + async fetch(request, env) { + const url = new URL(request.url); + + if (url.pathname.startsWith("/functions/")) { + // TODO: Add your custom /functions/* logic here. + return new Response("Ok"); + } + + // Otherwise, serve the static assets. + // Without this, the Worker will error and no assets will be served. + return env.ASSETS.fetch(request); + }, +}; diff --git a/Documentation/functions/[[html]].js b/Documentation/functions/[[html]].js deleted file mode 100644 index 733b4100..00000000 --- a/Documentation/functions/[[html]].js +++ /dev/null @@ -1,3 +0,0 @@ -export function onRequest(context) { - return new Response(JSON.stringify(context.params.catchall)); -}