Files
cwd/cwd-comments-api/src/utils/cors.ts
anghunk 73bbe44fbc refactor(cors): 简化CORS配置并移除未使用的参数
feat(email): 提取邮箱验证逻辑到共享模块并增强验证

docs: 更新文档移除不再使用的ALLOW_ORIGIN配置

style(admin): 为设置页面添加加载状态和样式优化

fix(comments): 在邮件发送前增加邮箱格式验证
2026-01-19 17:02:19 +08:00

13 lines
304 B
TypeScript

import { cors } from 'hono/cors'
export const customCors = () => {
return cors({
origin: '*',
allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
allowHeaders: ['Content-Type', 'Authorization'],
exposeHeaders: ['Content-Length'],
maxAge: 600,
credentials: false,
})
}