You would probably need a generic `[[catchall]]`, run `next()` and then check the content-type
You would probably need a generic
[[catchall]], run next() and then check the content-type[[catchall]]next()?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 afaik/plans.json?/[lang]/pricing?
DB, suddenly in production the binding is __D1_BETA__DB, anyone ever have seen this happen? Locally still works as expected (eg. DB). I found that this prefix exists in miniflare codebase but really confused to see this pop-up in my production project._routes.json ? https://developers.cloudflare.com/pages/platform/functions/routing/#limitsLimits
You may have no more than 100 include/exclude rules combined.
Each rule may have no more than 100 characters.
100 include/exclude rules combined would mean that our blog cannot contains more than 100 articles ?/api/*import it? The docs say we can import binary data, but does that require a .bin extension?const asset = await next();asset.headersexport function onRequest(context) {
// return new Response(JSON.stringify(context.params.catchall))
return next();
}Cannot find name 'next'.ts(2304)context.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>>/plans.json/[lang]/pricing__D1_BETA__DB100 include/exclude rules combined.binexport 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;
}{
"version": 1,
"include": [
"/*"
],
"exclude": [
"/_astro/_slug_.48022e81.css",
"/_astro/client.ee7b9fdd.js",
"/articles/5-races-de-chiens-deconseillees-si-vous-n-avez-jamais-eu-de-chien-video/",
"/articles/10-choses-amusantes-sur-les-chats-a-savoir-absolument/"
]
}