Question, do workers started by a cron trigger have the same subrequest limit (e.g they can only mak
Question, do workers started by a cron trigger have the same subrequest limit (e.g they can only make 1000 subrequests per invocation?)
read() without server response it got stuck? #TCP Sockets read() function got stuckBy default, Workers and Pages Functions are invoked in a data center closest to where the request was received. If you are running back-end logic in a Worker, it may be more performant to run that Worker closer to your back-end infrastructure rather than the end user. Smart Placement automatically places your workloads in an optimal location that minimizes latency and speeds up your applications.console.log the request.cf.colo field, then view it in live logs/wrangler tail?export default {
async fetch(request, env, ctx) {
let response = await fetch(request)
// Check if the request URL ends with "test.html"
// Create a new response with the same content but a different URL
const newUrl = request.url.replace('/test.html', '/rewrite.html')
console.log(newUrl)
response = new Response(response.body, {
status: 301, // Redirect status code
headers: {
...response.headers,
'Location': newUrl
}
})
return response
},
};read()By default, Workers and Pages Functions are invoked in a data center closest to where the request was received. If you are running back-end logic in a Worker, it may be more performant to run that Worker closer to your back-end infrastructure rather than the end user. Smart Placement automatically places your workloads in an optimal location that minimizes latency and speeds up your applications.request.cf.colowrangler tail