We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下面是在workers验证过可以执行的代码,用于获取用户真实IP的脚本源码,目的是用户访问这个workers的网址就可以报告用户端的出口ip地址
addEventListener("fetch", (event) => { event.respondWith( handleRequest(event.request).catch( (err) => new Response(err.stack, { status: 500 }) ) ); });
/**
但是上面这段代码按照你这个项目的方法,替代了_worker.js文件里面的所有代码成为上面的代码,在pages上一部署就报告错误,我由于对这些代码不熟悉,能否麻烦你帮忙看看是否在pages上部署要做相应的代码更改?
非常感谢!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
下面是在workers验证过可以执行的代码,用于获取用户真实IP的脚本源码,目的是用户访问这个workers的网址就可以报告用户端的出口ip地址
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
/**
*/
async function handleRequest(request) {
const clientIP = request.headers.get("CF-Connecting-IP")
return new Response(clientIP);
}
但是上面这段代码按照你这个项目的方法,替代了_worker.js文件里面的所有代码成为上面的代码,在pages上一部署就报告错误,我由于对这些代码不熟悉,能否麻烦你帮忙看看是否在pages上部署要做相应的代码更改?
非常感谢!
The text was updated successfully, but these errors were encountered: