v1.3.5: add CORS whitelist support (f.CORS) covering /cell and all custom routes

This commit is contained in:
2026-09-09 11:31:22 +08:00
parent cfecbff8f8
commit a4993502bc
6 changed files with 236 additions and 6 deletions
+2
View File
@@ -25,6 +25,8 @@ type Fun struct {
idleTimeout time.Duration // keep-alive 空闲超时,默认 120s
maxConcurrency int // 最大并发连接数;0 = 不限制
corsOrigins map[string]struct{} // CORS 来源白名单(小写比较);nil/空表示未开启
server atomic.Pointer[fasthttp.Server]
started atomic.Bool