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

How to exclude specific data centers (colos) from Worker routing?

PROBLEM: - Korean customer gets routed to Hong Kong (HKG) data center šŸ‡­šŸ‡° - External API (Gemini API) returns: "User location is not supported for the API use." āŒ - Customer can't use service they paid for ...

Cloudflare Worker with root domain as custom domain issue

Hi there, I have got a Cloudflare Worker mapped to the root domain and whenever I try to access it I get 'UNKNOWN HOST' error and the brower returns "we're having trouble finding that site". If I map a subdomain to the worker it works absoloutely fine. Has anyone else encountered issues using the root domain as a custom domain for a worker? Or is there some different configuration required....

"run_worker_first" not behaving as expected

https://developers.cloudflare.com/workers/static-assets/routing/worker-script/#run-worker-first-for-selective-paths The documentation above says that we can add to our wrangler.toml the run_worker_first line, for static asssets, where we can specify certain paths where the static assets should be routed through the worker first. [assets]...

What is the workers equivalent of the CF_PAGES_URL env var for Pages builds?

For preview builds I need to pass the preview URL to my static site build. Cloudflare Pages has the CF_PAGES_URL env var exposed during the build. What is the Cloudflare workers equivalent? If this doesn't exist, what is the ETA of this being available? For context I compared the below docs and see that there isn't an equivalent for workers. https://developers.cloudflare.com/pages/configuration/build-configuration/#environment-variables...

How can I determine how much storage a D1 query will or did use?

I'm wanting to monitor my query costs, one of which is D1 storage cost. This cost is a function of data size, e.g. inserting 100 bytes costs a function of 100 bytes. After running a query, the returned metadata contains a sizeAfter, but this isn't enough information without knowing the size before. Can the size of a row be estimated just based on its inputs? Something like JSON.stringify(["column 1", "column 2", "column 3"]).length?...

Error occurred while installing tools or dependencies

All my Workers Builds (multiple workers in a monorepo with separate builds) are failing with this error without further details. I saw some resolved a similar issue by disabling the build cache, but that hasn't helped. Is there any way to get further details? Here's a complete build log: ```...

Workers Egress Billing

I'm trying to create a proxy that combines existing github assets (~3GB total) into a single stream. Are there egress costs?...

R2 billing

Hello, I'm trying to enter my card for Cloudflare R2 and it says card refused. I've tried with several cards but the same problem. What should I do?

local agent dev -> "RPC error: Error: Method toJSON does not exist"

for the life of me, I cannot figure out why this RPC call is failing. Near as I can tell, when toJSON is not available, it means the durable object isn't available? my local DO seems to exist in .wrangler and naming agrees with my wrangler.jsonc, so idk if this is an agent thing or what. Happy to provide more here, but idk what to share. signed, nearly dead from this in Atlanta ā˜ ļø ...

Cloudflare Worker R2 Binding Large Files

Can Workers bound to a R2 bucket upload files larger than the plan limit? (100MB for Free, 500MB on Enterprise?)

security

How can I secure my worker so only my application can make requests?

Nondescript errors in durable objects

We are seeing a bunch of these errors without additional detail in observability (sample below): ``` { "source": {...
No description

Problem accessing Workers site with DNS server Manual

I have a problem, in my office I have a manual DNS server for the corporate internal VPN, I have a domain but when implementing Cloudflare Workers it does not work, since I can not configure a DNS record to a specific ip, should I configure a DNS record type CNAME with the name.user.workers.dev (url of the worker)? The www redirection works with cloudflare rule, but the site where you are using Cloudflare Workers is not responding to me, what is the manual DNS configuration for a cloudflare worker? When accessing from normal internet, the website in cloudflare worker works perfectly normal and works fine, my DNS server cannot use the public DNS records...

Is the Astro adapter necessary for me?

Hey everyone. I'm building a static Astro site that I want to host on Workers. No page will be server side rendered on demand. I will however need to use some backend functionality to process user input. Do I need the adapter for any of this? It seems more it's only for server side rendering, nothing else, but I might be wrong.

hono | When going to /api/auth/test then nothing comes up but the frontend

I am very lost right now. I have the react frontend and hono backend in the new workers. When I do: auth.get('/test', (c) => { console.log('test text'); return c.text('test text 2');...

Form submission not triggering anything server-side.

I'm working on a contact form that on clicking send should send an email. However after submitting the form I see no activity in chrome devtools network or logs despite having extensive logging within my server side code. I am watching via devtools and npx wrangler tails. I do see the INIT log right after its finished deploying. I suspect its the link between svelte code and typescript code because of the lack of logs. I am using svelte + typescript....

Workers from X API fails due to invalid response (just "IPv6" plain text)

I have a Cloudflare Workers app and it periodically calls X api every 30 minutes. Since July 3 2025 05:30UTC, the workload began failed due to ";SyntaxError: Unexpected token 'I', "IPv6" is not valid JSON" error. I found the response from api.x.com is just "IPv6" string with 403 http status. I tried to call X API on my local env (WSL Ubuntu) and it worked. So I guess the issue is on Cloudflare Workers. Does someone see same issue?

Other workers present in logs that are not mine

Can anyone explain why my Cloudflare logs show workers that are not in my account? Some seem like Cloudflare services, like ā€˜cdn’ (but who knows) but one that is just a seemingly random string of numbers gets a pretty decent amount of traffic volume. I almost suspect it’s my WAF skips, but that wouldn’t make sense, would it? How can I make better sense of this and differentiate between CF core functions and bad actors?...

Queues with TanStack Start?

I'm testing out using TanStack Start for an application, based on the framework quick start in the cloudflare docs (https://developers.cloudflare.com/workers/framework-guides/web-apps/tanstack/) but I'm not seeing a way to customize the worker code if I want to also add a Queue Consumer or a DO. Does anyone know how I can do that? It looks like react router, for example, will give you a way to generate a request handler (https://github.com/remix-run/react-router-templates/blob/main/cloudflare-d1/workers/app.ts)....

Worker running in unexpected location despite Smart Placement being disabled

Hi everyone, I’m experiencing an issue with my Cloudflare Worker where it’s running in a location that’s far from my users, despite Smart Placement being disabled. I’ve checked the settings and confirmed that Smart Placement is indeed disabled, but the Worker is still running in Marseille, FR, which is causing high latency for my users in Bengaluru, India. I’ve tried troubleshooting the issue, but I’m not sure what’s causing the Worker to run in a different location. Has anyone else experienced this issue? Any help or guidance would be greatly appreciated....