mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-21 08:52:43 +08:00
fix: 更新请求以包含Referer头部,增强locations路径的安全性
This commit is contained in:
@@ -301,7 +301,7 @@ export default {
|
|||||||
return new Response(订阅内容, { status: 200, headers: responseHeaders });
|
return new Response(订阅内容, { status: 200, headers: responseHeaders });
|
||||||
}
|
}
|
||||||
return new Response('无效的订阅TOKEN', { status: 403 });
|
return new Response('无效的订阅TOKEN', { status: 403 });
|
||||||
} else if (访问路径 === 'locations') return fetch(new Request('https://speed.cloudflare.com/locations'));
|
} else if (访问路径 === 'locations') return fetch(new Request('https://speed.cloudflare.com/locations', { headers: { 'Referer': 'https://speed.cloudflare.com/' } }));
|
||||||
} else if (管理员密码) {// ws代理
|
} else if (管理员密码) {// ws代理
|
||||||
await 反代参数获取(request);
|
await 反代参数获取(request);
|
||||||
return await 处理WS请求(request, userID);
|
return await 处理WS请求(request, userID);
|
||||||
|
|||||||
Reference in New Issue
Block a user