Version scan terminal cache key

This commit is contained in:
2569718930@qq.com
2026-06-01 06:46:34 +08:00
parent 6bc53c6e5d
commit 6e00160897
2 changed files with 12 additions and 0 deletions
@@ -56,6 +56,16 @@ export function runTests() {
/hasDirectBackendApiBaseUrl/,
"public scan terminal requests should only attach user auth in direct-backend mode so CDN caches can be shared through the Next proxy",
);
assert.match(
scanTerminalClientSource,
/SCAN_TERMINAL_PAYLOAD_VERSION/,
"scan terminal client should include a stable payload version in the URL so CDN caches roll forward after response-shape optimizations",
);
assert.match(
scanTerminalClientSource,
/params\.set\("_v",\s*SCAN_TERMINAL_PAYLOAD_VERSION\)/,
"scan terminal client should vary the CDN cache key without changing backend scan filters",
);
const overviewProxySource = fs.readFileSync(
path.join(