This commit is contained in:
eoao
2025-04-26 17:24:39 +08:00
commit 24ba4772e6
107 changed files with 13612 additions and 0 deletions

17
mail-worker/src/index.js Normal file
View File

@@ -0,0 +1,17 @@
import app from './hono/webs';
import { email } from './email/email';
export default {
fetch(req, env, ctx) {
const url = new URL(req.url)
console.log(url.pathname)
if (url.pathname.startsWith('/api/')) {
url.pathname = url.pathname.replace('/api', '')
req = new Request(url.toString(), req)
return app.fetch(req, env, ctx);
}
return env.ASSETS.fetch(req);
},
email: email
};