feat(email): 提取邮箱验证逻辑到共享模块并增强验证 docs: 更新文档移除不再使用的ALLOW_ORIGIN配置 style(admin): 为设置页面添加加载状态和样式优化 fix(comments): 在邮件发送前增加邮箱格式验证
13 lines
304 B
TypeScript
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,
|
|
})
|
|
}
|