Are you stripping the CF-Worker request header in your proxy?
Are you stripping the CF-Worker request header in your proxy?
User-Agent.




botManagement.score always 99 for non-pro accounts?[[catchall]].html?[[catchall]], run next() and then check the content-typenext()?const asset = await next();, check asset.headers for HTML, and do something, or just return earlyResponsecontext context.next()context via the EventContext typeEventContextexport const onRequestGet: PagesFunction<{}> = async (context) => {PagesFunction@cloudflare/workers-types setupPagesFunction should exist in that version too afaikUser-AgentbotManagement.score[[catchall]].html[[catchall]]next()next()const asset = await next();asset.headersResponseexport function onRequest(context) {
// return new Response(JSON.stringify(context.params.catchall))
return next();
}Cannot find name 'next'.ts(2304)contextcontextcontext.next()EventContextEventContextexport const onRequestGet: PagesFunction<{}> = async (context) => {PagesFunctionPagesFunctionPagesFunction@cloudflare/workers-types{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["esnext"],
"types": ["@cloudflare/workers-types"]
}
} "@cloudflare/workers-types": "^4.20221111.1",Type '(context: EventContext<{}, any, Record<string, unknown>>) => Promise<void>' is not assignable to type 'PagesFunction<{}, any, Record<string, unknown>>'.
Type 'Promise<void>' is not assignable to type 'Response | Promise<Response>'.
Type 'Promise<void>' is not assignable to type 'Promise<Response>'.
Type 'void' is not assignable to type 'Response'.ts(2322)
const onRequestGet: PagesFunction<{}, any, Record<string, unknown>>export async function onRequest(context: EventContext) {
console.log("hey")
const asset = await context.next()
return asset;
}export const onRequestGet: PagesFunction<{}> = async (context) => {
const asset = await context.next()
return asset;
}