exflower-license-server 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/routes.js +6 -6
package/package.json
CHANGED
package/routes.js
CHANGED
|
@@ -155,13 +155,13 @@ function buildLatestYml(mac) {
|
|
|
155
155
|
// version 取各行里语义最新(简单按创建时间最新的一行)
|
|
156
156
|
rows.sort((a, b) => (a.created_at < b.created_at ? 1 : -1));
|
|
157
157
|
const esc = (s) => String(s).replace(/'/g, "''");
|
|
158
|
-
//
|
|
159
|
-
//
|
|
158
|
+
// 远端优先(2026-09-06 翻转):有 remote_url 就写 CDN 绝对 URL——客户端单连接直连
|
|
159
|
+
// CDN,服务器只吐 KB 级 yml,多少客户端并发升级都不受本机带宽影响(115 类弱机
|
|
160
|
+
// 多实例的关键防线);本地文件仅作无 remote_url 时的兜底(离线/气隙场景)。
|
|
161
|
+
// 服务器仍后台拉包,本地副本是 CDN 不可达时的最终兜底(files/ 路由 302 已覆盖)。
|
|
160
162
|
const fileUrl = (r) => {
|
|
161
|
-
if (r.
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
return r.remote_url || `files/${r.platform}/${esc(r.file_name)}`;
|
|
163
|
+
if (r.remote_url) return r.remote_url;
|
|
164
|
+
return `files/${r.platform}/${esc(r.file_name)}`;
|
|
165
165
|
};
|
|
166
166
|
const lines = [`version: ${rows[0].version}`, 'files:'];
|
|
167
167
|
for (const r of rows) {
|