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

I just created a hello world worker from a template and it times out

I have no idea why. I had other workers running and they stopped working. I assumed it was something about the code, but then I created a completly new, fresh worker with a hello world template provided by cloudflare and that ALSO times out. I've contacted support, but maybe someone with a similar issue might be faster. It probably is some very stupid misconfiguration somehwere but i've tried to fix it with no luck 😢...

Environments best practices

With workers I can have a "default" environment (placing things in the root of the wrangler.jsonc, and n environments such as development. What's better: having the "default" be the production one with the development one being specified as a separate env (requiring me to add -e development when using that), or having the "default" one be the development, with the prod being its own env?

Attaching to multiple localhost workers via vscode? What's the port I need to give?

Hi, the advice in the following link doesn't seem to work if I try to attach to multiple running workers on localhost and attaching to them: https://developers.cloudflare.com/workers/observability/dev-tools/breakpoints/ The link mentions port 9229, it makes sense that I'd need to give a different one for each debugger but where would I see which port gets used and how do I configure that? Thank you...

Error 1015 on D1 database

I recently checked my error logs and find out that it is getting Error for D1 database requests (but not web fetch requests) I am calling from cron and I am aware of the 50 subrequest/call (free tier). I got error 1015 (I believe from D1 read) and D1_ERROR Error exexuting batch insert. I checked the Rows Written in D1 database page and it is only showing a few hundreds. Rows Read is 2.5k....

Replacements for pages _headers and _redirects

Hi, I've just migrated from pages to workers for my remix/react router apps. I used the _headers and _redirects for forcing cache headers on all files under a directory, and removing trailing slashes. e.g. ``` /favicon.ico? Cache-Control: public, max-age=3600, s-maxage=3600...

Error 1101

Hi I am new on Cloudflare. And I got this Error 1101. I plan to remove my domain from cloudflare, its was setup by Inter from lovable.dev Wondering what is the best way to remove the domain properly. So I can use my domain again...

Domain Issue

earlier i changed hosting from vercel to cloudflare, how long would it take for my Domain to be available again?

Does Cloudflare email worker verifies SPF and DKIM?

Hey, I'm wondering if email worker verifies SPF/DKIM and checks DMARC policy before it runs email function. I've searched through documentation and I haven't found information about this. I know that in raw email body are full headers (including spf and dkim checks), do we have to check them ourselves?...

KV binding not working via wrangler.toml

kind of new to this so I'm certain that I'm doing something wrong, but here's my wrangler.toml: ```name = "dropshipdb-worker" main = "worker.js" ...

Is it possible to have a worker and a pages app on the same domain

I am making a website and want to host them on the same domain, ie the api on mydomain.com/api/* and the webapp on mydomain.com/*. I'm not sure if I can do this with two separate workers, but I imagine I could get something working by serving the webapp in the same worker as the backend. Not sure though, is there any good advice?

How to implement free of charge ping pong in cloudflare Durable Object Websocket

I want to implement ping pong in my DO websocket so it's possible to know when the client is offline, since the websocket alone does not tells that. But I want to avoid extra charge for each ping/pong. Cloudflare says pings are not charged. Consider the following:...

Discord HTTP Interactions Issue

I'm having this weird issue trying to make a bot with CF workers where my worker hangs on the fetch in this block: ``js export async function discordFetch(env, url, options) { options = options || {}; url = https://discord.com/api/v10/${url}`;...
No description

Workers Email Testing

Is there a good way of testing sending/receiving emails using Cloudflare Workers locally without deploying? If not, how can I test without deploying to prod?

have a HTML file hosted on R2 that shows the live file size of the bucket, updating every 24 hours

basically this on the R2 dashboard, but on a page anyone can visit to see the file size every 24 hours. it's all good if it's just a tiny embed of a worker URL reporting the filesize, i just wanna see if this is possible?...
No description

Cloudflare Workers Not Loading only in Auckland

Hi, I am having some trouble debugging a high Wall Time (30 seconds) then basically times out issue in backend calls ONLY from requests from Auckland, New Zealand. Happens to a fair proportion of Auckland visitors (10% or so) and never happens to any Sydney or other country connections. How can i find our more about where this potential issue arised from?...

Preview deployments non a thing with Assets?

With Pages I could just push to another branch and that got its own .pages.dev URL. Doing the same with Workers Assets doesn't give me such URL, so... how can I get a preview deployment?—say that of the dev branch

Not able to use @google-cloud/speech

I am not able to use @google-cloud/speech package when i import it and just initialize class like below import speech from '@google-cloud/speech' // Initialize Google Speech Client...

Unable to bind workers to each other locally when using @cloudflare/vite-plugin

I've been trying to do the work to move to the cloudflare vite plugin. I've got most of the way there, the only remaining issue is that I can't seem to use multiple workers together locally. My setup is - A React Router v7 app - An API worker...

I wanna deploy my remix app to cloudflare

I wanna deploy my remix app to cloudflare

Chain multiple Workers/DOs with RPC stub forwarding across Service Bindings

I'm trying to achieve the most of the performance I can get by the ecosystem in a situation where I need to bounce a request from an introduction worker to a deeply nested Service Binding DO in my architecture: Until now I've been using HTTP across all services passing requests over the fetch() handler: Introduction Worker (HTTP) -> Worker A (HTTP) -> Worker B (HTTP) -> Worker C (HTTP) -> Worker D (HTTP) -> DO (HTTP) What I'd like achieve is switching to RPC for testing performance and speed: ...