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

If I have two "headless" workers (one

If I have two "headless" workers (one scheduled, one acting as an internal database proxy) communicating only via Service Binding, can someone possibly give me an example of calling an RPC method that's in one worker where one of the method parameters is a ReadableStream? The data I'm sending from the scheduled worker (a large array of arrays) to the database worker is greater than 1mb and it was recommended, in order to get past the 1mb limit of parameter value size, to use a `ReadableStream...

Hi folks, I'm trying to speed run a

Hi folks, I'm trying to speed run a prototype with Workers on top of my existing local stack. Basically I want to simulate normal traffic serving, but only a subset of my traffic routes should go to Workers. Is there an off the shelf pattern I can use for doing this reverse proxy in front of my existing stack?

Hi everyone, does anyone know whats the

Hi everyone, does anyone know whats the issue of Response Stream not properly working: fetch(request, env, ctx){ let { readable, writable } = new TransformStream();...

anyone know of an alternative to

anyone know of an alternative to nodemailer that can be used to send emails using cloudflare worker?

Hey all, I've had an issue bugging me

Hey all, I've had an issue bugging me for a while, and I can't figure out how to fix it. Looking for help 🙏 I've been developing oss libraries to use with the cloudflare ecosystem, and I've always run into issues with KV typing. Let me give an example. Here is a library that provides a kv adapter for epic-web/cachified - https://www.npmjs.com/package/cachified-adapter-cloudflare-kv Here is my super simplified example setup with it ```ts...

Cloudflare Worker TypeError: One-time-us...

Hello, I'm trying to build a reverse proxy where I'll use the cloudflare domain to proxy from a site. Now the application sends 302 when the user is signed out, and then I get to send a post request with the login information. The code below works, in the sense that it follows the redirects, but when I submit the form I get the following error: ```...

`WebSocketServer` is not a constructor

Hello all đź‘‹ I've built a simple Next.js app and got it deployed with CF Pages. I'm now integrating it with D1 databases and would like to run some tests on CI. I can't instantiate miniflare, though. It keeps complaining with the following:...

I get the error just when starting dev

I get the error just when starting dev mode no requests made. Let me start a thread with the code peices

Hono Static Assets

they are in /assets/static and in wrangkler its [site] bucket = "./assets"...

has anyone used webpack as a custom

has anyone used webpack as a custom builder on wrangler2? i need to for specific WASM compat issues with esbuild...and after switching i can't seem to get past "No fetch handler defined"

Hi everyone I m having trouble sending

Hi everyone, I'm having trouble sending some analytics events to my server hosted in Azure. I keep getting 522 timed out or 521 responses. I've verified that the server is externally accessible and have been able to hit the endpoint from several other locations but it fails every time only in my Cloudflare Workers. I have added a firewall rule to allow all CF IP addresses as well. I'm at a loss of how to proceed now. Would love some ideas! Note: It's on http://myserver:8000 address. Could the port or lack of https cause connectivity issues w/ CF? I know we can't fetch IP addresses directly w/ CF Workers but curious if there are other limitations that could be causing these issues...

is there a api client or something to

is there a api client or something to update dns records from within workers?

This error just started popping up on

This error just started popping up on what used to be a working script, did anything change?

Can you run with WRANGLER LOG debug and

Can you run with WRANGLER_LOG=debug and DM me the output?

Worker to update HTML element if it exists or create if it does not

I asked something in #workers-discussions but I think it belongs better here... Is it possible to write a worker that updates an HTML tag e.g. <title> if it's in the page, or inserts it if not? I can do one or the other, but I can't get it working when I need to try both. Have issues with ordering and closures. Maybe I can do some regex first? Any pointers appreciated!

Ah in that case you have multiple things

Ah, in that case you have multiple things you need to await (cause you need to fetch the data and then store it in cache). You could put it all in an async function like so: ```ts const foo = async () => { // do something }...

Behavior of secrets / environment variables with newlines (escaped / unescaped characters)

Now that's weird. When I put my key in a variable in the code (let key = "..."), it works perfectly but if I put the same key (I copy pasted it) in a secret, the importPKCS8() function results in an error : atob() called with invalid base64-encoded data. (Only whitespace, '+', '/', alphanumeric ASCII, and up to two terminal '=' signs when the input data length is divisible by 4 are allowed.) So it works but I would prefer to have the value in a secret since it's the key to my Google Cloud Service Account so it's not great for security to literally have it in my code......

Yes I figured out that token value is

Yes, I figured out that token value is reused by the next request when concurrent request on the same instant occur.

Bad DNS cache

How do I do that?
Next