fix: 优化Usage最大值计算逻辑,确保正确处理CF配置中的最大使用量

This commit is contained in:
cmliu
2026-01-06 19:44:23 +08:00
parent d868a7592b
commit 1e8dcabccb

View File

@@ -207,7 +207,7 @@ export default {
if (config_JSON.CF.Usage.success) {
pagesSum = config_JSON.CF.Usage.pages;
workersSum = config_JSON.CF.Usage.workers;
total = 1024 * 100;
total = Number.isFinite(config_JSON.CF.Usage.max) ? (config_JSON.CF.Usage.max / 1000) * 1024 : 1024 * 100;
}
const responseHeaders = {
"content-type": "text/plain; charset=utf-8",