Persarce commited on
Commit
99d551a
·
verified ·
1 Parent(s): ef4006b

Update src/index.js

Browse files
Files changed (1) hide show
  1. src/index.js +1 -1
src/index.js CHANGED
@@ -43,7 +43,7 @@ app.post('/hf/v1/chat/completions', async (req, res) => {
43
  // 获取checksum,req header中传递优先,环境变量中的等级第二,最后随机生成
44
  const checksum =
45
  req.headers['x-cursor-checksum'] ??
46
- process.env['x-cursor-checksum'] ??
47
  `zo${getRandomIDPro({ dictType: 'max', size: 6 })}${getRandomIDPro({ dictType: 'max', size: 64 })}/${getRandomIDPro({ dictType: 'max', size: 64 })}`;
48
 
49
  console.log(checksum);
 
43
  // 获取checksum,req header中传递优先,环境变量中的等级第二,最后随机生成
44
  const checksum =
45
  req.headers['x-cursor-checksum'] ??
46
+ process.env.CHECKSUM ??
47
  `zo${getRandomIDPro({ dictType: 'max', size: 6 })}${getRandomIDPro({ dictType: 'max', size: 64 })}/${getRandomIDPro({ dictType: 'max', size: 64 })}`;
48
 
49
  console.log(checksum);