v1.3.5: add CORS whitelist support (f.CORS) covering /cell and all custom routes
This commit is contained in:
@@ -12,6 +12,7 @@ NDJSON 流式响应、自定义路由与 TypeScript 客户端生成。
|
||||
- **NDJSON 流式**:`*fun.Stream` 逐行推送,支持首条消息 + 后续流
|
||||
- **自定义路由**(v1.3.0+):`BindRoute` 注册 GET/POST 回调、健康检查、通配符路径
|
||||
- **请求体上限控制**(v1.3.3+):`SetBodyLimit` 支持大体积 multipart 上传
|
||||
- **CORS 跨域**(v1.3.5+):`f.CORS(origins ...string)` 白名单按需放行,预检 204 直答,覆盖 `/cell` 与全部自定义路由
|
||||
- **TypeScript 客户端生成**:`BindServiceForGen` + `GenCode(fun.GenTs{})`,免基础设施即可生成,产物带 `result<T>` 归一化错误与拦截器
|
||||
|
||||
## 快速开始
|
||||
|
||||
Reference in New Issue
Block a user