That seems *extremely* high. What are you doing, may I ask?
That seems extremely high. What are you doing, may I ask?
ms. More CPU-heavy things will increase it (hashing passwords). This is not the same as the time a fetch request takes - a request might take 10 seconds but only use 1ms of CPU Time.
/functions/[[catchall]].js. This code logic works when deployed separately as a cf worker but not when translated to a cf pages function.env.ASSETS.fetch there instead which will try to request the site content 
functions/_middleware.ts for 'all requests, including in front of static files', can't tell if there's any granularity for static files_routes if you wanted: https://developers.cloudflare.com/pages/functions/routing/#create-a-_routesjson-filecurl, or anything that can make HTTP calls. They can be made to respect CORS, but by default do not
When using advanced mode, you need to bundle the worker—Cloudflare Pages build system doesn’t handle the bundling (if I recall correctly.)

Request type doesn't have a parsed body. This allows you to skip reading it if you don't actually need to parse it yourself. The await request.json() part tells it to begin pulling the body in, and parse it as JSONexport async function onRequest(context) {
const { request } = context;
let url = new URL(request.url);
// Set the hostname to the original site
url.hostname = "example.com";
let ogResponse = fetch(url, request);
// Now set the hostname to the Cloudflare Pages version
url.hostname = "test-branch.example.pages.dev";
const cfPagesResponse = await fetch(url, request);
// Return the Cloudflare Pages response if it's not a 404
if (cfPagesResponse.status !== 404) {
return cfPagesResponse;
}
// Otherwise, return the original site's response
return await ogResponse;
} //service worker
const body = JSON.stringify({
eventData: event.data,
shown: true,
})
fetch(`http://127.0.0.1:8788/cf/log-notification`, {
method: "POST",
"Content-Type": "application/json",
body: body,
}) // In CF function.
export async function onRequestPost(context) {
console.log(context)await request.json()// In Pages Function
export async function onRequestPost(context) {
console.log(await context.request.json());
// Do something else
}