diff --git a/README.md b/README.md index 85a9a7e5..b3cdeee0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ - 使用 Cloudflare Workers 部署后端 - email 转发使用 Cloudflare Email Route - Cloudflare D1 作为数据库。 +- 免费版附件过大会造成 Exceeded CPU Limit 错误 [在线演示](https://temp-email.dreamhunter2333.xyz/) diff --git a/frontend/src/Content.vue b/frontend/src/Content.vue index 96688236..771c9f4f 100644 --- a/frontend/src/Content.vue +++ b/frontend/src/Content.vue @@ -22,7 +22,7 @@ const refresh = async () => { } try { loading.value = true; - const response = await fetch(`${API_BASE}/api/mails?address=${address.value}`, { + const response = await fetch(`${API_BASE}/api/mails`, { method: "GET", headers: { "Authorization": `Bearer ${jwt.value}`, diff --git a/worker/src/router.js b/worker/src/router.js index fc054773..9ac10d37 100644 --- a/worker/src/router.js +++ b/worker/src/router.js @@ -4,7 +4,7 @@ import { Jwt } from 'hono/utils/jwt' const api = new Hono() api.get('/api/mails', async (c) => { - const { address } = c.req.query() + const { address } = c.get("jwtPayload") if (!address) { return c.json({ "error": "No address" }, 400) }