Cloudflare Pages: _redirects Rule to Pages Function Not Invoking Function (Leads to Nuxt 404)
Original message was deleted
_redirects rule on Cloudflare Pages that's intended to rewrite a path to a Pages Function. The function itself works when called directly, but the redirect rule doesn't seem to invoke it.ssr: false).public/_redirects file content:functions/api/internal-og-proxy/[uuid].ts. This function fetches HTML from our backend API (https://api.grepit.app/s/preview/:uuid) and returns it./api/internal-og-proxy/:uuid function path.https://grepit.app/s/SOME_VALID_UUID/preview):404 Not Found response.internal-og-proxy function.https://grepit.app/api/internal-og-proxy/SOME_VALID_UUID) WORKS perfectly.HTTP/2 200 OK with the expected text/html content from our backend API./s/:uuid/preview /api/internal-og-proxy/:uuid 200 as active._redirects rule to use a hardcoded UUID instead of the :uuid placeholder (e.g., /s/ACTUAL_UUID/preview /api/internal-og-proxy/ACTUAL_UUID 200) still resulted in the same 404 for the /preview URL and no function invocation./api/internal-og-proxy/:uuid). The _redirects rule is recognized by Cloudflare as valid and active. However, the redirect rule is failing to invoke the function, causing the request to fall through to the Nuxt SPA, which then (correctly from its perspective) renders a 404._redirects rule (performing a 200 rewrite) would not invoke a Pages Function that is otherwise proven to be working when called directly? Any insights into routing precedence or debugging this further would be greatly appreciated.public/_redirects/s/:uuid/preview /api/internal-og-proxy/:uuid 200functions/api/internal-og-proxy/[uuid].tshttps://api.grepit.app/s/preview/:uuid/api/internal-og-proxy/:uuid/api/internal-og-proxy/:uuidhttps://grepit.app/s/SOME_VALID_UUID/preview404 Not Foundinternal-og-proxyhttps://grepit.app/api/internal-og-proxy/SOME_VALID_UUIDHTTP/2 200 OKtext/html/s/:uuid/preview /api/internal-og-proxy/:uuid 200:uuid/s/ACTUAL_UUID/preview /api/internal-og-proxy/ACTUAL_UUID 200/preview