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 use websockets on workers?

I'm trying to connect openAI realtime to workers, I use nuxt/nitro. I get this error in the logs: [ws] Error in open handler: SyntaxError: WebSocket Constructor: The protocol header token is invalid....

Documentation on Edge Use in Cloudflare workers with NextJS

I have deployed a nextjs app meant for game server advertising, and I am looking to utilize Cloudflare's edge. Is there any documentation for it? Thanks in advance!...

Browser Rendering: Upstream proxy via BrowserContext proxyServer fails in Workers with net::ERR_PROX

I’m trying to run a browser session in a Worker using Browser Rendering and route its outbound traffic through an upstream HTTP proxy. The same proxy configuration works locally with standard Puppeteer. In the Worker, creating a proxied BrowserContext and authenticating the page consistently fails

error occurred while updating repository submodules

Hi, I'm trying to deploy my nextjs website on Cloudflare Workers, the repository contains a submodule for the API. I don't need that in the worker, but the worker tries to clone it automatically, during that step it throws: ``` 22:59:04.178 Initializing build environment... 22:59:11.842 Success: Finished initializing build environment...
No description

proxying fetch requests

Is there still no way to fetch via a proxy server using workers?

Worflows deploy issue

With wrangler I am not able to deploy workflows. I tried with: 1) My own workflows 2) Cloudflasre default one: npm create cloudflare@latest workflows-starter -- --template "cloudflare/workflows-starter" In cli it is showing:...

ASN 8075 Microsoft Azure botnet cluster detection

Hey all, looking for escalation advice or success stories on getting Microsoft to take down Azure-hosted bot clusters. Context - Seeing coordinated abusive traffic sourced from ASN 8075 (Microsoft Azure). - Looks like short-lived rented VMs running the same automation playbook....

[Question] NestJS Support

Now after worker starting experimental support node:http, can we run NestJS on workers? anyone try it?

Invalid WebSocket close code: 1006.

Somehow my websocket closes after 1 minute of inactivity, I don't really understand why, since I am letting the durable object hibernate and this should NOT close the websocket. Any ideas what I am doing wrong? More of my error:
message:...

Tensorflow Lite on workers for inference

Hello, I’m exploring options for running inference on TensorFlow models with Cloudflare’s products. Is it possible to achieve this using Workers or any other Cloudflare service? Any technical guidance or references would be greatly appreciated. Thank you!...

Image Transformations on workers.dev urls?

Do image transformations not work on workers.dev urls? I have a zone with Image Transformations enabled, and in the Transformations settings I have included a workers.dev url under "Specified origins". I have my domain listed, and my preview url listed, which is a workers.dev url like this: ``` xyz-web-preview.myaccount.workers.dev...

Limits to Secrets?

I am designing a system using workers that will have multiple tenants. I want to store secrets per tenant. Are there any limits (e.g. size or # of secrets) to the secret store? Also related: how does scaling work for the workers? I don't think I can have a dedicated worker for a tenant, right?...

Workaround to import third-party libs on Workers Scripts?

I'm trying to build a full-stack app using Hono + ReactJS with Cloudflare Workers for Platforms. My pipeline now involves generating the components, sending these components to Cloudflare Containers, in Containers, I'm compiling React with Vite, and creating the Worker Script. I made a simple API that returns some hard-coded products with IDs and prices. Then I return these scripts, and upload them to Workers for Platforms using formData.append It is all working and is actually fetching data But I would like to extend this back-end to use Hono or create more complex API logic using any other third-party library. How can I do it? Am I thinking about it in the wrong way? How could I use Workers for Platforms to create a more complex back-end logic? ...

Worker spawning a Browserless container - Wrangler causes WS dropouts

I'm trying to set up a worker that can spawn containers that runs Browserless/Chromium image. If I run that image directly through a docker-compose, I am able to connect php-chrome and puppeteer to the containers websocket, but if I use wrangler I seem to have sockets drop out, they'll connect fine and navigate to a page, but at times it'll fail to navigate and/or input on the page. Seems to only happen if I'm running wrangler locally developing and have had to revert to using docker-compose for...

What's the recommended way to use environment variables in a SvelteKit project?

Hello, I'm new to workers and want to know how I can manage and access environment variables in a SvelteKit project with Vite, the docs are really vague and confusing on how and the SvelteKit docs mention using getPlatformProxy but I'm not sure if it's for local development only or also prod, How am I supposed to use them?...

Streaming response breaks on one Cloudflare account, but not the other

I've discovered that streaming is broken for a cloudflare worker, but only in one of my accounts. Working deployment: https://tss-streaming.jakst.workers.dev/ (streaming works on every request) Broken deployment: https://tss-streaming.jn-endform.workers.dev/ (streaming only works on every ~10-20th request or so) ...
No description

How to deploy a full stack app using cloudflare workers with astro as frontend and hono as backend?

I used npm create cloudflare@latest -- my-astro-app --framework=astro to create my starter template, then I create an api/workers.js with ``` import { Hono } from 'hono' const app = new Hono()...

Prevent binding override

How do I make workers not override the D1 bindings defined from the dashboard when I push?

Worker -> Durable Object fetch RPC call performance in Rust

Hello I'm running into some performance issues using Workers and Durable Objects. I'm using rust. I would like some help improving performance. I have a worker that clients connect to. The Worker then passes the request through to a Durable Object (DO) which establishes a websocket connection and sends over a somewhat large batch of data. I measured a measures for a cold start of the durable object....
No description

Cloudflare is redirecting /@foo to /%40foo

I'm using the vite plugin with a SPA. It works in development, but after deploying to production, Cloudflare returns a 307 redirect. Does anybody know what component is doing this rewriting and how to disable it? As far as I can tell, @ is a valid character in a URL.