docs(analytics): 管理后台域名改为 md.tkmind.cn
Memind CI / Test, build, and release guards (push) Has been cancelled

同步 Analytics 发布 runbook 与 admin 默认 PUBLIC_HOST,与 memind_adm 生产入口一致。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-10 17:38:31 +08:00
parent d570856cbd
commit 871688550e
7 changed files with 24 additions and 26 deletions
+7 -7
View File
@@ -15,10 +15,10 @@ test('parseList splits, trims, and drops empties', () => {
});
test('hostAllowed: empty list allows all, otherwise matches hostname ignoring port/case', () => {
assert.equal(hostAllowed('gadm.tkmind.cn:8082', []), true);
assert.equal(hostAllowed('GADM.tkmind.cn', ['gadm.tkmind.cn']), true);
assert.equal(hostAllowed('evil.example.com', ['gadm.tkmind.cn']), false);
assert.equal(hostAllowed('gadm.tkmind.cn:443', ['gadm.tkmind.cn', 'localhost']), true);
assert.equal(hostAllowed('md.tkmind.cn:8082', []), true);
assert.equal(hostAllowed('MD.tkmind.cn', ['md.tkmind.cn']), true);
assert.equal(hostAllowed('evil.example.com', ['md.tkmind.cn']), false);
assert.equal(hostAllowed('md.tkmind.cn:443', ['md.tkmind.cn', 'localhost']), true);
});
test('ipMatches: exact and IPv4-mapped IPv6', () => {
@@ -48,7 +48,7 @@ test('buildNetworkGuard returns null when nothing configured', () => {
test('buildNetworkGuard denies on host then ip, allows when both pass', () => {
const guard = buildNetworkGuard({
allowedHosts: ['gadm.tkmind.cn'],
allowedHosts: ['md.tkmind.cn'],
ipAllowlist: ['10.0.0.0/8'],
onDeny: (_res, _req, reason) => `deny:${reason}`,
});
@@ -60,8 +60,8 @@ test('buildNetworkGuard denies on host then ip, allows when both pass', () => {
};
assert.equal(guard(mk('evil.com', '10.1.1.1'), {}, next), 'deny:host');
assert.equal(guard(mk('gadm.tkmind.cn', '8.8.8.8'), {}, next), 'deny:ip');
assert.equal(guard(mk('md.tkmind.cn', '8.8.8.8'), {}, next), 'deny:ip');
assert.equal(nexted, false);
guard(mk('gadm.tkmind.cn', '10.1.1.1'), {}, next);
guard(mk('md.tkmind.cn', '10.1.1.1'), {}, next);
assert.equal(nexted, true);
});