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

Hi I have some questions about workers

Hi I have some questions about workers - if I have a backend python process that typically takes 3-4 minutes could that scale well with workers, or would it quickly get to be too expensive? I'm not sure I understand how this would work with the pricing model. It's an image processing thing and I'm not sure I can do much more to optimize it

if you go under your worker, logs ->

if you go under your worker, logs -> real-time logs, you can tail and see the request url

I want to check on whether I am missing

I want to check on whether I am missing something obvious... I have a worker bound to a domain like api.something.com. And then I set up SaaS hostnames for it. In order to do that, I set up a route */* in order to match all of the requests. Unfortunately, that means I cannot also have another SaaS worker at other-api.something.com . (Because the */* route is taken). Is that expected?...

Right, CF For SaaS enables that. You can

Right, CF For SaaS enables that. You can't get apex proxying outside of Enterprise so you need to rely on alias records, but it should just work if you go through the prevalidation and such

has anyone written a worker based

has anyone written a worker based redirect / rewrite / proxy with configuration similar to netlify's _redirects?

uh, hi everyone i’m really not

uh, hi everyone i’m really not knowledgeable on this stuff but i got the advanced certificate and a bunch of subdomains, but one of my workers, that i deployed with my Debian Raspberrypi with Vue3 and Vite is now pointing all of my subdomains to “fallback domain” which stupidly enough, is - by my own admission- my root domain. now i’ve changed the fallback but cloudflare hasn’t validated the root cert in 48h, while all subdomains are instantly ready. so i guess my question is, if my worker is removed, does it delete all subs? ...
No description

Good day guys.

Good day guys. I wanna ask for advices about how deploy a worker API that I implemented using D1 as storage and a react SPA built using vite, that I used to serve using express.js.
1 - Is it good to deploy the worker as is and in parallel the react SPA in pages? Will this be ok? 2- Will this need cors whitelist or something? 3 -Will be better to serve the SPA using getAssetFromKV from '@Cloudflare/kv-asset-handler'?...

Cloudflare (Workers) Fetch Cache & Redirects Behavior

In Cloudflare (Workers), how does the 'fetch' caching behavoir work when the fetched resource is a redirected to somewhere else? Let's say we have a cache everything and TTL on a specific fetch request, that fetch requests ends up doing a temporary redirect to another URL, will it, the URL that is being redirected to, be fetched from cloudflare's cache if available? A concrete example for our Storyblok scenario: If we don't have a cache version (cv) available and we fetch /v2/cdn/stories/home?key=234234234, Storyblok will redirect this to a link that does have the cache value (cv) query param /v2/cdn/stories/home?cv=2342342234&key=234234234, will the second URL be fetched from the cloudflare cache or not? Preferably in this case, if we get a redirect status code from Storyblok, we don't want to cache that response. But if it redirects to an URL that does have the cache version (cv) included, and we already have that cached, we want to actually retrieve it from the cloudflare cache if available there....

👋🏻 Hey all. I am a PM on the Workers

👋🏻 Hey all. I am a PM on the Workers team. I'm doing some exploration into ways that people might want to use container-based workloads alongside Workers. If you are somebody who has wanted to use a container with Workers in some way, or has strong opinions on the topic, I'd love to chat! (Again, this is just an early exploration, so please don't get hopes up around something imminent!) - If you want to chat, feel free to book a time: https://calendar.app.google/qS8Dr4L2L2bWQ6726, or if you do...

Dynamic imports

I ended up with the following
No description

Where do you want requests not including

Where do you want requests not including /v1 or /v2 to go? 🤔 But for anything path based, Routes are the answer. You can either layer one on top of a Custom Domain, have nothing underneath (dummy aaaa record 100::) or put an origin underneath if you want/need...

Thread for the socket issue

and after 40s in the worker the connection is still CLOSING

I'm looking for an example of a

I'm looking for an example of a successfully built workers-sdk / workerd stack --- I'm fixing a bug in workerd myself and would like to compile it end-to-end. Anybody have any examples / resources?

If you turn on Domain Lockdown, then it'

If you turn on Domain Lockdown, then it's not exploitable with your domain. But many of their customers don't have this enabled, and if you sign up with another hosting provider that uses MailChannels, you can still send emails from many of their customers that'll pass security checks, yes.

Had a thing up recently where every

Had a thing up recently where every check I did was geolocated to SanFran

Hey im getting this error when trying to

Hey im getting this error when trying to use a service binding: ```ts TypeError: Cannot read properties of undefined (reading 'fetch') at handler (index.js:7841:37) at async handle (index.js:2287:29)...

smart placement + RPC

I got seen zoned on general discussions with this question, figured I'd ask here 😅 . Would love some clarification.
Quick question about the smart placement limitation on RPC service bindings. Is that temporary? Or is it a limitation that is expected to be around for a while? Not looking for a timeline, just some confirmation the vision for RPC....

Worker waitUntil question

I have a worker that I want to call an external api on, but I want to return a response without awaiting the the external api call. (the external api call is to just save time writing to the db on another service). ```javascript const promise = fetch('http://localhost:3000/impression', { method: "POST",...

Interface return type in RPC functions for Service / WorkerEntrypoint

I'm trying to implement a RPC Service in my auth service worker that verifies a jwt token, but whenever import an interface type from another file, it infers the return type of the RPC to never. But when I turn that interface into a type instead of interface, it does work, why is that?

So I have searched already quite a bit

So I have searched already quite a bit but I'm not sure where or how I unsubscribe from these daily notifications that I reached 50% of my free tier capacity 😅... I know I'm above 50% and it is fine, it resets daily. But every single day I get 2 - 3 emails from Cloudflare: [Cloudflare]: 50% of daily usage limit for Cloudflare Workers KV operations reached. Simply put, I'd like to unsubscribe or manage treshold for these notifications and I don't know where or how to do it....
No description