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

Getting blocked when trying to deploy worker

I came across an interesting issue just now. I tried to deploy my worker with some new code so i clicked on the Deploy button. Then the message "API Request Failed: PUT /api/v4/accounts/ACCOUNT ID/workers/services/forwardreleases/environments/production?include_subdomain_availability=true (403)" came up. So i checked in the Network tab of my Browser to see what's going on and it seems like i am getting blocked by cloudflare? At least i see it when i visualize the html it returns i get this what's shown in the screenshot. Ray ID is:
929a2fba1c461c05
929a2fba1c461c05
I tried:...
No description

Questdb Nodejs Client not working

I get this error when trying to run the questdb client in miniflare. I have posted a minimum reproducible error - https://github.com/apolo-damasco/cf-workers-questdb ```⎔ Starting local server... ✘ [ERROR] Error sending data TypeError [ERR_INVALID_ARG_TYPE]t" argument must be of type number. Received type string ('utf8') ...

Network error with outbound fetch() requests (some domains working, others not)

When using fetch() requests on Cloudflare, we now experience "error code: 525" for the past 4 days on certain worker custom domains, not the workers.dev domain. https://keyauth.win/psdb - error code: 525 https://keyauth-worker.agentreachout.workers.dev/psdb - success (no SSL error) https://prod.keyauth.com/psdb - success (no SSL error)...

Periodically re-importing D1 database and Maintenance mode

I have a read-only REST API serving (semi) static data. Each month the data changes and we basically get a full name database; there is no diff or whatsoever available. So my idea was to drop the existing D1 tables, and run the import script. And in the meantime return a maintenance response....

Error Cannot read properties of undefined (reading 'get')

Hello, I'm new to Cloudflare and Durable Objects. I have written my first test app that attempts to synchronize a TinyBase store into a durable object. I'm receiving two errors for each request: 1) Cannot read properties of undefined (reading 'get')...

My worker serves sitemap.xml but Google can't read it

I don't have a static site on the domain so if cloudflare chooses to not proxy and run the worker then it will fail, but is there a policy about when cloudflare will step back and try to make the client use the static site? I can't be sure that's the problem, so maybe it's something else. Is there a way to see what Google sees?...

Does Cloudflare Workers will handle custom HTTP/S headers?

Hi, I am looking forward to use CW as middleware to create custom headers for a website to secure it in a better way. Website itself has been created using Webflow and there is not a way to add custom HTTP/S headers by the admin panel nor domain registar does not provide any tools to do that. I've learned that CW can do that, so I would like to know how to preprare before I start. Is there an specific knowledge (i know HTML/CSS/JS/TS and tools around like Git quite well). I haven't done that before and I am looking for professional tips to do it properly....

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?
Next