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

React-Router v7 - Caching does not work

I have a personal website running using react-router v7 in framework mode, deployed via Cloudflare Workers. Typically, I receive 100-500 requests per day. However, in the last few days, I got over 12.5k requests from just two different IP sources within roughly 3 hours. According to the Security > Analytics dashboard, 99% of the requests should be mitigated or cached by Cloudflare. Yet, when I checked the Workers dashboard, nearly all requests were billed. ...
No description

Pointing domain to workers without first removing its DNS record

I'm moving one of our main production services to a Cloudflare Worker - however, it seems that I don't have a good way to "change" the DNS record to point to the Worker - rather, it asks me to first "delete" the record, which as we all know, can cause a downtime for some of our users that try to access it until DNS propagates to the worker. Is there a best practice for this?...

Struggling to run server code before workers cache

So in my case inside hooks.server.ts (similar to middleware in other frameworks) im trying to write analytics, and then check cache. But in my case analytics are never written if i get a cache hit. im not using cache headers, only return the cache response from the server. does anyone have a clue why only non cache hits trigger my code here? ```ts const cachedHandle: Handle = async ({ event, resolve }) => {...

Running Astro project in a Worker. Local deployment not showing console.log, .warn, .info etc.

I am working on an Astro deployment into Workers. I'm trying to debug talking to a KV binding, but the console isn't showing any outputs. Here is an example of one of my pages. --- import BaseLayout from '../layouts/BaseLayout.astro'; import Header from '../components/Header.astro';...

fetch not working

fetch is not working in my program, going to attempt to show it as well as possible. the initial call : ```js...

NextJS Deployed to Workers with SendEmail binding, Types issue.

Hey, Quiet newbie around workers, I tried to create NextJS project (via OpenNext) and deploy it to Workers, achieved that, next was to bind a D1 Database, this one almost went smoothly, right now I am trying to bind SendEmail, but there is this issue I could not overcome. First things were that Module cloudflare:email was non existent, so with help of AI - managed to extend webpack configuration to declare external cloudflare:email module, and provide a mock to that....

binding MYBROWSER of type browser cannot use version 1

I'm trying to save an environment variable in the Workers settings Variables & Secrets modal and getting this error when trying to save. The variable I'm saving has nothing to do with the MYBROWSER binding....

Newbie - Cant get worker to run on route (WP Engine)

IF you are trying to deploy a worker on a WP ENGINE hosted site - here is my finding (as of 6/23/25): In this setup, the instance of cloudflare managing your domain and dns is the "CDN/Proxy Layer" and the WP Engine instance of cloudflare (their so called "advanced network security") is the "Origin Server". By default (using the standard DNS config provided by WP Engine), no routes setup in the Proxy Layer will run. If you try to troubleshoot with either cloudflare support (good luck), or with WP Engine, neither will be able to tell you why....

custom binding with CLI `wrangler versions`

I have this dynamic value that is in my github actions. i want to upload a version with a specific binding to it. In essence i want this to work: HUBS_EMBED_URL=https://google.com wrangler versions upload for some reason this does not end up as an env variable in the version 😦...

Email Workers Message.reply() Timeout (~30s)

Hey there! I’m trying to process an inbound email, make a long-running RPC to Browser Render (which might take 1–2 minutes), then reply to the sender using message.reply(). My issue is that Message.reply() is no longer allowed after ~30 seconds - the event window just closes. Is there any way to defer a message.reply() or park the reply until after the async work? I'd like to avoid having to use env.EMAIL.send() due to recipient verification. Any ideas?

ENOSPC error on very small project

``` 09:47:27.467 Finalizing page optimization ... 09:47:27.469 Collecting build traces ... 09:47:46.333
09:47:46.334 > Build error occurred...
No description

Images binding locally with vite

This page teaches how to run the images binding locally with wrangler but not if we’re using vite. has anyone managed to make it work while running vite? e.g.: environments in vite are passed as the CLOUDFLARE_ENV env variable....

Custom Hostname with Worker Environment

Hey folks, how can I use different worker environment with custom hostname setup. As far as I understand we can use a single fallback origin. What's the best way using different workers such as dev, staging and production for a custom domain?

A request to the cloudflare api failed

When running wrangler deploy after vite build, getting the following error: ✘ [ERROR] A request to the Cloudflare API (/accounts/1b4084a019e362dcc38aaf959044234e/workers/scripts/fluent-bi-website/versions) failed. An unknown error has occurred. If this error persists, please file a report in the workers-sdk GitHub repository (https://github.com/cloudflare/workers-sdk/issues) or reach out to your account...

How to correctly set up emails for a report feature in my app?

I have a node backend that sends emails using credentials for vikitorek.app@gmail.com User can click report button and I need to create an email that is being sent to support@vikitorek.com -> I have set up email routing from support@vikitorek.com to vikitorek.app@gmail.com but when the backend sends email using vikitorek.app@gmail.com to esentially itself (vikitorek.app@gmail.com) cloudflare is sending me only warnings that google is not showing such email and that I'm supposed to send from a different account. Do I really need a separate no-reply.vikitorek@gmail.com account to send emails from? Or is there some standard setup for an app to create a support email to itself?...

Wrangler dev server failing to start: ERROR write EOF

I have an Astro + SolidJS project with worker code in app/api/ and static files in app/src/ When i run bun run dev I get an error and server does not start:...

When are new container-worker coming?

i haven't found anything, they were announved for june

Using fetch from inside worker results in 404 or 405 errors

I'm using fetch from inside a worker to call an external API (which has CF in front of the origin) and I get a 404 for a GET request and 405 for a POST. Both these requests work fine using fetch from my worker when testing locally or in the browser. What might be causing these issues when inside a worker?...