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
export default { async fetch(request, env) { const cars = [ "app1.example.com", "app2.example.com", "app3.example.com", "app4.example.com", "app5.example.com" ]; let host = cars[Math.floor(Math.random() * cars.length)]; //随机选择VPS //let host = cars[new Date().getDate() % cars.length]; //每天自动更换VPS let url = new URL(request.url); if (url.pathname.startsWith('/')) { url.hostname = host; let new_request = new Request(url,request); return fetch(new_request); } return env.ASSETS.fetch(request); } };
The text was updated successfully, but these errors were encountered:
@skydevil88 麻烦你如果有空的话,能否帮忙看看#4 的代码问题
非常感谢!
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: