Can you see it in cf-connecting-ip?
Can you see it in cf-connecting-ip?
onRequestPost on the index.ts, no matter WTF I try, I always get a [wrangler:inf] POST /api/hotels 405 Method Not Allowed (4ms) :shrugg: it doesn't even go in (neither is my code returning this).wrangler pages dev _site while in the root folder, I'm not a directory up or down, like this guy: https://community.cloudflare.com/t/cf-pages-functions-wrangler-dev-405-method-not-allowed-locally/442767/14 besides, even if I were, my other functions would've have worked anyway.index, or with path placeholders like [id], or dedicated endpoints like /instagram. I have more than one file with 'onRequestGet' and 'onRequestPost' on them, and they work just fine.rm -rf .wrangler ?db.sql that has a drop-table at the start anyway
TypeError: Cannot read properties of undefined (reading 'waitUntil')context is undefined


let cookie = request.headers.get("cookie")let cookie = context.request.headers.get("cookie")folderRoot/
└── functions/
└── api/
└── hotels/
└── index.tsonRequestPostindex.ts[wrangler:inf] POST /api/hotels 405 Method Not Allowed (4ms)wrangler pages dev _siteindex[id]/instagramrm -rf .wranglerdb.sqlTypeError: Cannot read properties of undefined (reading 'waitUntil')let cookie = request.headers.get("cookie")let cookie = context.request.headers.get("cookie")export const onRequestPost: PagesFunction<Env> = async ({ request, env, ctx }) => {
// ...
ctx.waitUntil(myAsyncFunction(env, anId));export const onRequestPost: PagesFunction<Env> = async ({ request, env, waitUntil }) => { const response = await c.env.HUB.fetch(
new Request(new URL('/account/signup', c.req.url), {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email } as SignupRequest),
}),
);// wrangler.toml
name = "hub"
[[services]]
binding = "HUB"
service = "hub"