修改 wrangler.toml

This commit is contained in:
2025-11-23 18:16:22 +08:00
parent 039ea4fe63
commit c7cc860304
2 changed files with 2 additions and 18 deletions
-15
View File
@@ -1,15 +0,0 @@
import { getAssetFromKV } from '@cloudflare/kv-asset-handler';
addEventListener('fetch', event => {
event.respondWith(handleEvent(event));
});
async function handleEvent(event) {
try {
// Let kv-asset-handler serve files from the generated `public/` asset manifest.
return await getAssetFromKV(event);
} catch (e) {
// Fallback: return a simple 404 for missing assets
return new Response('Not Found', { status: 404 });
}
}
+2 -3
View File
@@ -1,6 +1,5 @@
name = "website" name = "website"
compatibility_date = "2025-11-23" compatibility_date = "2025-11-23"
main = "workers-site/index.js"
[site] [assets]
bucket = "./public" directory = "./public"