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

Cloudflare snippets subrequest count issue.

Cloudflare snippets have just 2 sub request limit for snippets, but i am able call fetch inside snippet with a url, which has 4 redirect calls and its still working. How is it possible ? Also, FYI, when i change the extenal api call url to a url which has 5 redirects, then it hits sub request limits....

Worker secrets How do they work?

hello! I have been trying to setup a token for my api using enviroment secrets for several hours now with little success how do i access an enviroment secret in my typescript worker?...

Multiple workers at the same domain, but multiple paths in wrangler.jsonc

I am trying to setup multiple workers at api.mydomain.com with different paths, but am not sure how to configure the routes section in wrangler.jsonc I want my worker’s APIs to be available at api.mydomain.com/worker. But if I set that in the routes array in wrangler.jsonc like this: ```json...

Worker timeout

Hi, could there be an explanation to why my worker is timing out? It is very rare, for example in the last 3 days the worker received 1 million requests and only 54 of them timed-out .

Videos restricted from R2

Hi, I received two emails from Cloudflare regarding Traffic Restriction. However, I am utilizing R2 Storage with a custom domain for my files. I noticed that Cloudflare R2 offers free egress in its features. Therefore, I am unclear about the restrictions I am facing. Could you please help me and assist me in resolving this issue? Two mails:...

Uncaught (in response) Error: IMAGES_TRANSFORM_ERROR 9432: Bad request: 10 "transforms" maximum

Hi, I am trying to use image transformation via binding and there is limit 10 transforms, which doesnt exists if I use old fetch api. Is there way how to go around it? Trying to create matrix of images, e.g. 10x10 images as a single image output. Thanks 🫡

hacking through workers

Hello, I am experiencing an issue with my Cloudflare account where suspicious Workers are being created without my authorization. These Workers are deploying a fraudulent captcha on my website. I have deleted them multiple times, but they keep reappearing. Here’s what I’ve checked so far:...

Maybe a dumb question, but I can not found the error log

Fresh new for cloudflare, after I deployed, I got a 500 server internal error. 1. After a lot of time of search, I found that I did not not enable web analytics, so i see nothing under Account Home > domain you want to check > Analytics & Logs. 2. After open it, then I stuck at the 500 server internal error shows when I access the site, but in the log, no 5xx code error at all. But I think this maybe because of sample. 3. Then I tried wrangle tail with live debug, but I always stuck at starting local server. when i enter b(browser), d(dev tool) with no response. and a x will response error handle hot key. ...
No description

Can you send a signedurl from R2 to Whisper model?

I am getting a 500 error in production when trying to send the R2 signed URL. I am not sure what string Ai_Cf_Openai_Whisper_Input is expecting? Error: InferenceUpstreamError: {"httpCode":500,"message":"TypeError: Cannot read properties of undefined (reading 'length')","name":"AiError"} ```...

Sending Early Hints from Workers

Is there a way that I can conditionally send early hints (103) from my workers? I want to preload assets based on request headers and it looks like the Early Hints optimization in the Speed panel will cache the preload hints and serve them for all requests. Is that correct?...

Limit [wrangler:inf] logging without setting --log-level

When developing locally it is super annoying to get the [wrangler:inf] logs all the time, but if I remove them (by setting --log-level) then it disables console.log as well Is there any way to limit these invocation logs locally? I have them disabled in my wrangler.toml, but it doesn't seem to have any effect...

DKEM and SPF records change

Hi there! My DKEM and SPF records was changed by mistake and my website provider/registrar said that Contact the nameserver's owner. Can you guys change it? Thanks

Cache handling for static assets

Hello, I cannot find anywhere how to configure cache headers for static assets under workers. I'm planning to deploy Angular SSR app, obviously there are files like index.html or service worker which should be rather short lived and other that are immutable as build uses hash names. How can I configure this with static assets ? ...

Workers AI Error 429 (3040)

I recently noticed a lot of requests failing to the Workers AI. I looked into it and found out that it is returning a 3040 error. According to the docs this means "No more data centers to forward the request to". I'm using "meta m2m100-1.2b". My Question is if there is any way i can prevent those errors? For example buying the Workers paid plan? Or is that really an Issue with the Workers AI?...

Serve static assets from root path, then handle /api/ requests with my worker?

I was hoping the "Static assets" feature could help me simplify my setup (currently Pages + Workers). I'm having trouble with wrangler dev currently. I want to serve static assets (stored in public directory on filesystem) for every request except for /api/ requests, which my worker should handle.

Proper way to use CF Images transformation via Worker binding

Looks like doc examples are broken. Does anyone have a tested code snippet?

How to upload from R2 to Cloudflare Stream for large files?

https://discord.com/channels/595317990191398933/893253103695065128/1349612376852533260 I would love for this to work on my local setup as well so I don't have to test on R2 directly on cloudflare, but if that is the only way to test large files let me know. ...

CF Workers - Empty Body to origin servers

Less than 1% of records of passed through CF workers sending empty body to origin servers and a leading to 422 and at times 524 errors. Please help us where we are doing mistake.

401: Workers MCP server

As following "https://github.com/cloudflare/workers-mcp" steps, i deployed and can find mcp functions in Claude desktop app, but when send prompt, it shows Fetch failed. Got (401) Unauthorized, as ''I tried to send a greeting to your Workers server, but it looks like there was an authentication issue. The server returned a 401 Unauthorized error.''', thanks
No description

Workers: Concatenating a large ReadableStream and a footer?

Hey! I have a large document that i get with fetch and i need to pipe it to my client through a response. The file is too large to fit in the worker memory so I am streaming it. Is there any way to concatenate the stream and a footer(for now, 127 null bytes) in a non cpu and memory intensive way?...