注释掉 token_bridge 的四行调试日志
This commit is contained in:
@@ -59,13 +59,13 @@ function initialize(html, scripts, baseUrl) {
|
|||||||
|
|
||||||
function computeToken(method, path) {
|
function computeToken(method, path) {
|
||||||
if (!window) throw new Error('not initialized');
|
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;
|
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();
|
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);
|
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 url = xhr.__ts_url || '';
|
||||||
const idx = url.indexOf('c93l5Fya=');
|
const idx = url.indexOf('c93l5Fya=');
|
||||||
if (idx < 0) throw new Error(`Token not found for ${path}, url=${url.substring(0,80)}`);
|
if (idx < 0) throw new Error(`Token not found for ${path}, url=${url.substring(0,80)}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user