Astro endpoints not working on Cloudfalre Pages

I’m trying to deploy a Cloudflare Page with astro framework. I’m able to get astro endpoints to work for GET requests but not POST / PUT / DELETE. Sending a POST / PUT / DELETE request is still being received as a GET request. I think the problem is with the Cloudflare adapter. The endpoints work as expected on localhost. If I switch the adapter to Netlify, it also works on Netlify.

Below are the astro and Cloudflare adapter versions:
astro: ^2.6.4
@astrojs/cloudflare: ^6.5.0

Here’s a snippet of the endpoints:

export const get = ({ request }) => {
  return {
    body: JSON.stringify({
      message: 'This was a GET!',
    }),
  }
}

export const post = ({ request }) => {
  return {
    body: JSON.stringify({
      message: 'This was a POST!',
    }),
  }
}

Any advice? Thanks!