build: add express-rate-limit dependency and related auth protections 1. 新增express-rate-limit依赖并为登录接口添加请求频率限制 2. 修复路径访问校验逻辑,避免误判同目录下文件 3. 优化会话配置:使用随机密钥并根据环境设置secure cookie 4. 补充多语言文案:登录尝试过多的提示 5. 调整CORS配置并修复API 404返回格式 6. 完善认证中间件的用户信息挂载
build: add express-rate-limit dependency and related auth protections 1. 新增express-rate-limit依赖并为登录接口添加请求频率限制 2. 修复路径访问校验逻辑,避免误判同目录下文件 3. 优化会话配置:使用随机密钥并根据环境设置secure cookie 4. 补充多语言文案:登录尝试过多的提示 5. 调整CORS配置并修复API 404返回格式 6. 完善认证中间件的用户信息挂载