Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

using.htaccess file

Can I use .htaccess files in Cloudflare Pages? I want to rewrite the URL example.com/favicon.ico to example.com/favicon.

using pages with logpush

Hi, I want to use pages with logpush to access runtime logs. Ive created a logpush job and connected it to an R2 bucket. The job is enabled and the events are the workers trace events. I have 6 different pages app, but the R2 bucket is empty (it just contains a challenge). Has anyone managed to make cloudflare pages work with logpush ? How can I debug ? ...

SLA for Cloudflare Pages 100%?

I saw in a document that Cloudflare’s Business plan Service Level Agreement (SLA) is 100% Does this mean it includes the features of Cloudflare pages and Cloudflare workers? If it’s the Business plan, then the SLA is 100% for everything? please let me know if my understanding is incorrect....

Proxy URI path to external IP

I've recently tried deploying a NextJS site, and with the URL Rewrites not working I need to find an alternative. I'm trying to route /api/:path to an external IP where my API is hosted, but with very little luck. The only thing that has worked so far is setting up a Page Redirect, but I don't want my API's IP address being exposed, and preferably proxied. Any straightforward way to do this?...

Sveltekit and private images related: ERROR 9425 Image access denied: sig query-string argument is n

So trying to implement the signed URLs of private images in Sveltekit. I've done absolute minimal to translate the given URL signing solution at https://developers.cloudflare.com/images/cloudflare-images/serve-images/serve-private-images-using-signed-url-tokens But it doesnt seem to work because of : ERROR 9425: Image access denied: sig query-string argument is not properly hex-encoded (must be 64 hex chars)...

Get list of pages inside a path

I am trying to get the list of pages inside a path. For example, if I have this in my project _ blog/ |_ blog1.html |_blog2.html...

Server Side Rendering with PlanetScale and Edge runtime

Hey there! I’m currently trying to develop a webpage with a data the being fetched in the getServerSideProps in next.js, with planet scale (with the @planetscale/database library, this library support edge runtime). I uploaded the website to Cloudflare Pages, but I get this error when I open the page: “Error: Some functionality, such as asynchronous I/O, timeouts, and generating random values, can only be performed while handling a request.”...

struggling to get pg working with page function.

I've tried passing it with and without quotes.

Deploy Deno static site

Is there a way to deploy a site that uses Deno to build? I'm using the the Deno Lume static site generator, and I don't see it was one of the build configurations, and I don't see Deno listed as a supported tool here: https://developers.cloudflare.com/pages/platform/language-support-and-tools/...

MailChannels and Turnstile validation not working when combined 405 error

This is the code in _middleware.ts Each of the blocks is working separately (when I comment turnstile block, emails are being sent, when I comment out mailchannel code, turnstile validation works) but when I uncomment both blocks I get 405 error. I can see all log messages. ```...

Wanted to opt-out for edge deploy

Hello, I have a website developed with NextJS 13 (pages dir). I wanted to ignore/opt-out from the edge in some specific paths because it exceeds the limit of 1MB (edge functions need to be under 1MB). And yes it is a dynamic route. I dont want to disable edge for whole website, I still use the edge run time in my API Routes and middleware. Thanks for your response MeowHeartCloudflare

Access to git tag

git describe --candidates 0 doesn't return a valid tag even if the HEAD of the corresponding branch is correctly tagged with an annotated tag. How can I get that tag? Or, what exact command Cloudflare build system uses to clone the repository? I'm using Gitlab if that matters. Thanks...

images returning content-length of 0 intermittently

I'm using a middleware function for some redirects, and occasionally on my pages I will get images coming back "content-length" of 0. Seems to be intermittent, but also everyother refresh they will show up. The function isn't touching any of the images on load, verified with console.log before the middleware function calls next(); Can head to this image, and it seems to do it in a fresh incognito window for me. ...

how to trigger manual fetch of new commits?

the GitHub integration failed to pick up new commits. Everything looks right - is there a way to tell Pages to go check the repository for new commits and build them?

Custom Domains limits

Does anyone know if the cap of 100/250/etc custom domains is a hard limit or can we pay per amount we go over? https://developers.cloudflare.com/pages/platform/limits/#custom-domains I see that Vercel has unlimited domains per project, so we may have to look into them but would rather stay on CF...

Fetch api not working in pages

hello there, i deployed my page on cloudflare pages but here the issue fetch data from api is not working also one more thing the api is using subdomain and the domain is on cloudflare so what wil be the solution for this?

Cannot connect pages with github. I can grant access, but nothing shows up in cloudflare to after

I've tried everything, can you please help? This needs someone to reset it on the backend. When I first enetered pages my old account AND the repos I've since deleted were both showing. Now I can't get anything to show up. It does look like I'm a child of a parent account (I did have two), but I deleted that one after a domain lapsed. If I reset the password of the email that shows up above the left nav bar in cloudflare I don't get a password reset (expected). Very frustrated, spent well over a...

CF PAGES: Deploying vue.js (via vitejs) using yarn

Hello, I'm trying to deploy a vue.js application (created with vite) on cloudflare pages. I used yarn and I have the impression that the problem comes from there (I could be wrong). site: https://cps-counter.pages.dev account id: 8d66c0d8ba7d39049166f7cfc2e78866 error, repo & deployment id are in logs (file)...

Combine Cloudflare for SAAS with Cloudflare Pages

What is the right way to combine these two services? I want to manage custom domains through my domain panel (ssl-tls/custom-hostnames). From my panel we have 100 custom domains included and we will pay $0.10 for each additional domain! In Cloudflare Pages if I go over 100 domains, I need to hire another plan! Can I continue using Cloudflare for SaaS?...

Middleware forward headers to other functions

Hello, I am building a next application and I have a middleware where I add the href in a header. Then I access it in some server components. It's working correctly on Vercel and locally but on Cloudflare, the header is not forwarded to the server components. Do I need to add something else? Or do you have another solution? I want to access some query params in a nextjs layout but from what I know it's not directly possible right now. ...