lix02 commited on
Commit
ed8f67e
·
verified ·
1 Parent(s): c88d075

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -64,10 +64,10 @@ app.get('/*', async (req, res) => {
64
 
65
  // 判断访问路径
66
  if (req.path === '/html') {
67
- res.set('Content-Type', 'text/html');
68
  res.send(result.htmlContent); // 发送 htmlContent 的纯文本响应
69
  } else if (req.path === '/core') {
70
- const coreContent = result.htmlContent.match(/\[CDATA\[\(function\(n,t\)\{onload=function\(\)\{_G\.BPT=new Date;n&&n\(\)\{(.*?)\/\/\]\]/s);
71
  if (coreContent) {
72
  const extractedString = coreContent[1].replace(/https:\/\/r\.bing\.com\/rp\//g, 'https://sokwith-proxybing.hf.space/rp/');
73
  res.set('Content-Type', 'text/plain');
 
64
 
65
  // 判断访问路径
66
  if (req.path === '/html') {
67
+ res.set('Content-Type', 'text/plain');
68
  res.send(result.htmlContent); // 发送 htmlContent 的纯文本响应
69
  } else if (req.path === '/core') {
70
+ const coreContent = result.htmlContent.match(/\[CDATA\[\(function\(n,t\)\{onload=function\(\)\{_G\.BPT\{(.*?)\/\/\]\]/s);
71
  if (coreContent) {
72
  const extractedString = coreContent[1].replace(/https:\/\/r\.bing\.com\/rp\//g, 'https://sokwith-proxybing.hf.space/rp/');
73
  res.set('Content-Type', 'text/plain');