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

Direct connection to Postgres DB with SSL enabled (for Rust worker)?

I am trying to connect directly (without Hyperdrive) to my Postgres DB (hosted on Supabase) via a Rust worker using tokio-postgres, as follows: ``` let conn_str = env.secret("DB_CONN_STR"); let config = tokio_postgres::Config::from_str(conn_str)?;...

Looking for feedback on a WAF-false-positive workaround with a Worker

Background - We have a web-mail POST endpoint behind CF Enterprise WAF.
- Fields like html_body, image, compose_cc often trigger false-positives.
- We do want WAF Managed Rules on the rest of the form (To/From/Subject/etc). ...

Node.JS Compatibility Error...

so following the video, I was expecting this error, but when I go to add that flag, then things have changed a bit. the flag that is suggested by the error, 'nodejs_compat' is no longer in the list, and instead, there are 2 similar available: with or without populate_process_env. see screenshot. I tried both of them, they don't work. I'm still getting that error. any idea?...
No description

responseStreamDisconnected errors when making 6+ sub requests in worker

We are using ctx.waitUntil() API to make sub requests to send metrics/logs to DataDog, and when there are 6 or more requests, the request/response that is being returned is truncated. When looking at real-time worker logs, the outcome field is set to "outcome": "responseStreamDisconnected", . There are no other errors that are present. The format we are using to send metrics is ctx.waitUntil(async function() { return await fetch(...)});. The individual requests all function correctly, and I can reproduce this error by enabling any one of them, but if they are all enabled together, an error occured. We have the following wrangler.toml config:...

Durable Object console logs on the dashboard

How can I see the durable Object console logs on the dashboard? I can see the worker logs in the corresponding worker, but the console logs from my worker are not visible.

Deployment on Workers build goes fine, but waits until it timeouts

Hi, I have a strange issue that began this morning (Europe time). My Opennext build and deployment goes fine, but the Build box stays "up and running" until the 20 minutes timeout occurs. See the timestamps in the screenshot, it idles for 7 minutes even if the build is done and deployed. Normally some more lines appeared after the "Current version ID": ``` Success: Deploy command completed...
No description

Access wrangler properties in code

Hi, can I access wrangler properties in code?
No description

Requests from Cloudflare Workers to external API result to 520

Hi, When making a request to my API from cloudflare workers it returns 520. URL: https://api.staging.us.modeinspect.com/...

I can't add my domain

@SuperHelpflare @Flare @SuperHelpflare I can't add my domain (biddabari.com) to Cloudflare. I have some issues with this domain name, but I can't find it. I don't have any due. All bills are paid. Please help me. Error-1 : Refer to https://cfl.re/3VUQyyL for assistance. The zone cannot be upgraded at this time. Error-2 : could not run legacy post zone sub request against new zone products: failed to update user subscription: failed to apply object products: You cannot add or modify subscriptions or services until the outstanding balance is paid. You should be able to do so in your Billing page....
No description

Cloudflare node version change

Hi dev, please help me out on changing the node version,
I have tried to set the NODE_VERSION 20.9.0 in the env form, still it is responding...
No description

cacheEverything: true vs Cf-Cache-Status: DYNAMIC

Hi all, I have 2 zones on 1 account. Both have very similar Cache Rules, where effectively Cache eligibility evaluates to "Eligible for cache". Then I have a Cloudflare worker deployed to both zones, which contains piece of code: ``` const response = await fetch(requestUrl, {...

override_existing_dns_record

@Vero @SuperHelpflare We deployed our frontend to workers assets, but we have A record for our domain and when we trying to configure Custom domain it showing error:(
already has externally managed DNS records (A, CNAME, etc). Either delete them, try a different hostname, or use the option 'override_existing_dns_record' to override.
i tried to find any information regarding override_existing_dns_record but didn't find any documentation regarding that https://developers.cloudflare.com/search/?query=override_existing_dns_record...

How to redefine types generated by `wrangler types`

Running wrangler dev generates ```ts declare namespace Cloudflare { interface Env {...

Queue "send" method hangs, binding is set it up and queue is exist.

Hey there. For some reason even though binding config is set for the queue, env.QUEUE.send(message); hangs in worker. but sending manual message over dashboard to queue just works fine. what may be the issue? In local everything is fine, in production, when pushing manual message through dashboard to the queue everything also just works fine, and queueHandler picks the message as it should be, but when it comes to sending message from worker to queue with send() method it hangs forever. binding is surely in the settings and I call exactly how the binding is set it up via env, so it is env.EMAIL_QUEUE.send() in my case....

How to use vercel/og to generate open graph images?

I see the plugin @cloudflare/pages-plugin-vercel-og for pages project but didn't found the example to genrate image using workers. When I install this package on a worker project, it throw any wasm error. Any suggestion how to generate og images on workers?...
No description

Attached Debugger to Worker Process?

Is it possible to attached a debugger to a vitest test suite? Using single fork and disabling file parallelism yields
TypeError: Customizing inspector host is not supported with vitest-pool-workers....

Update name in Wrangler configuration file to match deployed Worker #1

when I deploy a wrangler without name=“x”, it generates a pull request, however I don't want to put a name as the repo is used for multiple workers and it generates several pull requests per hour. (You have a pull request pending to accept. Please accept the changes before your next deployment to avoid compilation failures), how can I remove this behavior.

How to stream responses and return a known content length?

I'm using workers as a thin proxy with a little bit of logic between object storage (s3 in this case, but in the future likely r2) and clients. I'm wondering how to support sending data back with a content length header but without buffering the full object in memory? When I return a response with a stream, workers transforms the response to Transfer-Encoding: chunked and removes the Content-Length header to conform to the http spec. There's a great http client (object_store) I'd like to support with this proxy, but it requires content length headers. When i asked there about transfer encoding chunked support they said nope (https://github.com/apache/arrow-rs-object-store/issues/340#issuecomment-2849485808). Any suggestions?...

Email Routing - Forwarding to multiple recipients

Hello, We are attempting to forward emails to multiple verified recipients. Such as: ```export default { async email(message, env, ctx) { const recipients = ["[email protected]", "[email protected]", "[email protected]"]; ...
Next