注释掉 token_bridge 的四行调试日志

This commit is contained in:
2026-05-16 12:12:31 +08:00
parent 2489684dad
commit 017b9bb397
+4 -4
View File
@@ -59,13 +59,13 @@ function initialize(html, scripts, baseUrl) {
function computeToken(method, path) {
if (!window) throw new Error('not initialized');
process.stderr.write(JSON.stringify({trace: 'computeToken', method, path}) + '\n');
// process.stderr.write(JSON.stringify({trace: 'computeToken', method, path}) + '\n');
const OriginalXHR = window.XMLHttpRequest;
process.stderr.write(JSON.stringify({trace: 'XHR class', hasXHR: !!OriginalXHR}) + '\n');
// process.stderr.write(JSON.stringify({trace: 'XHR class', hasXHR: !!OriginalXHR}) + '\n');
const xhr = new OriginalXHR();
process.stderr.write(JSON.stringify({trace: 'xhr created'}) + '\n');
// process.stderr.write(JSON.stringify({trace: 'xhr created'}) + '\n');
xhr.open(method || 'GET', path);
process.stderr.write(JSON.stringify({trace: 'open called', url: (xhr.__ts_url||'').substring(0,100)}) + '\n');
// process.stderr.write(JSON.stringify({trace: 'open called', url: (xhr.__ts_url||'').substring(0,100)}) + '\n');
const url = xhr.__ts_url || '';
const idx = url.indexOf('c93l5Fya=');
if (idx < 0) throw new Error(`Token not found for ${path}, url=${url.substring(0,80)}`);