mirror of
https://github.com/maillab/cloud-mail.git
synced 2026-04-25 08:16:01 +03:00
[PR #260] [CLOSED] Configure CORS origins for worker #257
Labels
No labels
bug
enhancement
enhancement
enhancement
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloud-mail-maillab#257
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maillab/cloud-mail/pull/260
Author: @zlylong
Created: 2/9/2026
Status: ❌ Closed
Base:
main← Head:main📝 Commits (2)
0d2b539Configure CORS origins for worker4ce9ec1Merge pull request #1 from zlylong/codex/configure-cors-with-origin-whitelist📊 Changes
2 files changed (+58 additions, -2 deletions)
View changed files
📝
mail-worker/src/hono/hono.js(+57 -2)📝
mail-worker/wrangler.toml(+1 -0)📄 Description
#cors_origins = [] #CORS允许的前端域名列表 示例: ["https://mail.example.com"]
mail-worker/src/hono/hono.js 使用 app.use('*', cors()),默认允许所有来源,可能导致跨站请求风险(尤其是前端会带认证信息时)。建议限制到明确允许的域名列表并配置 credentials 等参数。
收敛 CORS 允许的来源并显式配置
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.