exports.cors = { origin: [ "https://www.youcan365.com", "https://ykt.youcan365.com", "http://localhost:5173", "http://localhost:5174", "http://localhost:5175", "http://localhost:8081", "http://localhost:6060", ], methods: ["GET", "POST"], // 只允许 GET 和 POST 方法 allowedHeaders: ["Content-Type", "Authorization"], // 允许 Content-Type 和 Authorization 请求头 exposedHeaders: ["X-Custom-Header"], // 暴露 X-Custom-Header 响应头给浏览器 credentials: true, // 允许发送 Cookie maxAge: 600, // 预检请求缓存 10 分钟 };