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 subdomains (like api and id) from triggering a Worker?

Hi everyone, I’m trying to configure my Cloudflare Worker so that it runs on all subdomains of my domain (*.mydomain.com) except for a couple of specific subdomains — namely apimydomain.com and id.mydomain.com. For these two subdomains, I want the Worker not to be invoked at all. I’ve tried:...

Worker function help..

I’ve could flare worker and i want to do cache the video while serving many users. I mean i have 3BG video it should cached video Please help me anyone have issue Thank you...

workers with spa

how should I configure my worker so it’s using index.html for spa but I can configure api routes in worker? currently I rewrite all other login to index.html - is it a good solution?

Data Clone Error when returning a Response from an RPC

I have worker A that exposes and endpoint to initialize a websocket connection. I have worker B that holds the durable object for the websocket connection and exposes and RPC entry point method to initialize the websocket. So A calls B via RPC, B replies with a Response including the websocket client. I am getting the data clone error on the websocket response. I am aware RPC have a limitation that they must return serializable objects. My question is, is there any workaround to get this w...

Workers can be protected by WAF?

i am considering using CF Workers in my next project and would like to understand if it's possible to use DDoS protection on workers in the paid plan

Does Workers with Static Assets have a limit on deployment attempts

I have viewed docs of Cloudflare Workers limit and found no limits of deployment count for both Workers Free and Paid plan. Support AI told me Workers Free have a limit of 500/mo but I haven't found a valid source. However, Pages does have a limit of deployments (100/mo for Free users, for example). So I wonder: - Does Workers actually have a deployment attempts limit?...

Does writing to Queue from a Worker count against the Worker's subrequest limit?

Does writing an item to a Queue from a Worker (using a service binding) count against the Worker's 1000 subrequest limit? Is that true for Workflows too? I'm a confuzzled at the intended goal of Queues as a product offering while this limitation exists. The purpose of Queues is to process massive amounts of items in a controlled manner... but the max number of items that can be added to a Queue at a time is 1000?? It seems to be a direct cap on the usefulness of queues....

When will Cloudflare containers be ready?

We’d like to know when the Cloudflare containers will be ready? Thanks!

Custom error pages don't work

In CF Pages, custom error pages like 404 work. But in workers, it defaults to the browser error page. Is this a limitation of workers? Or should I make a feature request?

Email worker: "Error: cannot forward email to same worker" suddenly appearing

I have an email worker largely based on the content from this thread https://community.cloudflare.com/t/my-email-worker-catchall-backup-routing-plus-addressing-and-subdomain-addressing/634156 It has been working fine. But recently when doing the forward of the email, it throws this error...

Confused: Astro on Cloudflare Workers - Accessing DOs & Env for Auth (Coming from VPS/SQLite)

I'm working on porting an Astro project with authentication from a traditional VPS/SQLite setup to Cloudflare Workers, and I'm feeling a bit lost on how to correctly access Cloudflare features like Durable Objects (DOs) and environment variables/secrets from within my Astro server-side code. On a VPS, I'd just connect to SQLite and read environment variables directly. With Cloudflare Workers: Accessing Bindings: How exactly does my Astro code (e.g., in an API route src/pages/api/auth/login.ts or a helper function in src/lib/auth.ts) get a reference to my Durable Object binding (defined in wrangler.toml) or environment secrets? I've seen context.locals.runtime.env, but I'm unsure if this is the right way for everything....

Astro assets can not be loaded with `rollupOptions.output.assetFileNames`

Hi, I'm migrating an Astro project from Cloudflare Pages to Cloudflare Workers using the @astrojs/cloudflare adapter. ( So it is SSR. ) After switching to Workers, I found that none of the assets are loading properly. In my astro.config.mjs, I’ve set a custom asset file naming like this: ```.js...

Stuck with Custom Domain Support After Migrating from Pages to Workers

Hey everyone! I've recently migrated my React app (Vite, React Router v7, SSR) from Cloudflare Pages to Cloudflare Workers. The app is multi-tenant and supports custom domains. My dynamic subdomain setup (via a proxy worker) is still working great. However, I overlooked an important detail in the Workers vs Pages migration guide: Cloudflare Workers do not support custom domains that are outside of Cloudflare-managed zones. Unfortunately, this is a key requirement for our platform since we aim to make domain configuration as easy as possible for users....

Binding (or API) for Routing Metadata

Is it possible for natively (or fetching the API) get a domain of the route where the Worker is deployed? I'm cron-triggering a scheduled worker that creates an external object including a self-link to a next page of it, so it can be handled by its fetch exported handler. I'm currently solving this problem with an env set manually (I wonder is there a global/shared variable for configuring values like its routes?)....

Missing Entrypoint

I'm getting this error when using the GHA for wrangler. [ERROR] Missing entry-point to Worker script or to assets directory Running wrangler versions upload locally works in the sense that it at least uploads....

Do Workers respect the deployed site's timezone?

Moved a Hugo project from Pages to Workers. Pages project had a TZ env variable since time zone wasn't being honoured at build time. Do workers support time zone at build time?

Is adding a cron trigger to wrangler.toml enough?

I moved my Hugo site from Pages to Workers. CF docs recommends adding a cron trigger [triggers] to the wrangler.toml file. Is that enough? I set one for midnight.

Really confusing 404 handling on static asset serving

My understanding is that - If the file is in a static asset, serve the asset first (no workers) - If it's a file not in static assets, - if the fetch mode is navigate, serve 404.html. - otherwise run worker...

JavaScript worker accessing secrets store for array

I was using simple environment variables for a variable that was split with “\n”. So I could have it all stored in github via toml I converted to using the secret store. I teceived an error that ...