security: CORS 白名单移除 localhost 并改为 config.ini 驱动

扫描发现生产 CORS 含 http://localhost:9200(硬编码于 fsys.py),且 config.ini 的 cors 段(通配符 *)从未被读取。白名单改为从 config.ini 读取,生产值仅 qsont.me/yhdet.top,localhost 仅限本地开发显式配置。
This commit is contained in:
qing committed 2026-07-28 11:40:19 +08:00
1 parent 7726857d6b
commit 4d16bc32fc
2 files changed
+11 -3

No files matched your search

+4 -1
View File
@@ -11,4 +11,7 @@ cert_file = cert.pem
key_file = key.pem
[cors]
allowed_origins = *
# 允许跨域的 Origin 白名单(逗号分隔)
# 注意:生产环境请勿包含 localhost / 127.0.0.1 / 通配符 *
# 本地开发联调时可临时追加 http://localhost:9200,调试完务必移除
allowed_origins = https://qsont.me,https://yhdet.top