-
Notifications
You must be signed in to change notification settings - Fork 787
Open
Description
作者描述:“默认测速大小为200MB:当未在路径中指定测速大小时,项目会默认进行200MB的测速。”
这里是有错误的,查阅代码
if (!path) {
// 路径为空,将 bytes 赋值为 100MB
bytes = 100000000;
} else if (path === "locations") {
return locations_cn(request);
} else if (path === "cdn-cgi/trace") {
// 反代 cdn-cgi/trace 请求
let targetUrl = https://speed.cloudflare.com/cdn-cgi/trace;
let cfRequest = new Request(targetUrl, request);
let response = await fetch(cfRequest);
return response;
} else {
// 其他路径,进行正常的处理
const regex = /^(\d+)([a-z]{0,2})$/i;
const match = path.match(regex);
if (!match) {
// 路径格式不正确,返回错误
return new Response("路径格式不正确", {
status: 400,
});
,其实默认大小为100MB,而非200MB
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels