Skip to content

Commit 35fd394

Browse files
committed
fix: 更新请求以包含Referer头部,增强locations路径的安全性
1 parent d3592ae commit 35fd394

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export default {
301301
return new Response(订阅内容, { status: 200, headers: responseHeaders });
302302
}
303303
return new Response('无效的订阅TOKEN', { status: 403 });
304-
} else if (访问路径 === 'locations') return fetch(new Request('https://speed.cloudflare.com/locations'));
304+
} else if (访问路径 === 'locations') return fetch(new Request('https://speed.cloudflare.com/locations', { headers: { 'Referer': 'https://speed.cloudflare.com/' } }));
305305
} else if (管理员密码) {// ws代理
306306
await 反代参数获取(request);
307307
return await 处理WS请求(request, userID);

0 commit comments

Comments
 (0)