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

ah opps the worker to worker case wouldn

ah opps the worker to worker case wouldn't be a 521 anyway. so your worker is fetching another subdomain? If the other subdomain is unproxied, it's worth noting the worker fetch request goes through the full cdn pipeline as if it was proxied. A Common issue is your SSL/TLS Mode (under SSL/TLS -> Overview) is Flexible, so the Worker's trying to connect to your origin over http/80 and your origin only supports https/443, need full or full (strict). Otherwise 521 is a generic connection refused (could be firewall/etc). I assume it works fine not through the worker...

Can you describe a bit more what this

Can you describe a bit more what this solution entails? Generating token upon login and sending to client browser, then verifying when required? I found this which might help me https://github.com/tsndr/cloudflare-worker-jwt

i was able to get by with a monorepo

i was able to get by with a monorepo with workers each in their own directory, with a single tsconfig.json and single package.json at root. Code sharing is no problem and yes, dependencies aren’t as easy to track between each of the workers, but Wrangler anyway would bundle only whats required for each of the workers. The way i see it, each worker has a separate wrangler.toml in its respective folders, and that is the more important/ separate manifest than package.json....

The struggle is real. I can only imagine

The struggle is real. I can only imagine the pain you went through. I'm strongly of the mind the cloudflare themselves should be producing these kinds of templates—so they can dog food their own work. I hope you will consider submitting this to the remix.guide. appreciate it...

Does it need to happen synchronously,

Does it need to happen synchronously, before the HTTP response ends? If not, you could use Workflows and do batches of 100 and then a sleep. Alternatively, you could use Queues and publish a message per item and have some rate limiting, but Workflows will be better imo. Only drawback will be you’d need to create sub Workflows at a certain point with the current step limit (e.g. you’d have an effective cap of 51,200 inserts per Workflow)

@thomasgauvin , I posted a question

@thomasgauvin , I posted a question about hyperdrive on local a little earlier

Also, I'm having trouble connecting with

Also, I'm having trouble connecting with a local postgres DB when using hyperdrive. I've tried both using the env variable & the localConnectionString, but I keep getting this error: ```...

Workflows result

👋 Is it possible to get a result from creating a workflow? Something like this? let result = this.env.MYWORKFLOW.create({ params: { id }, })...

I am, its working pretty good. The

I am, its working pretty good. The durable object isn't that big of a cost factor if you use it at scale. Maximum like $10 dollars a month orso? That you use it like 24/7. As currently there are not session costs?

What's your payload?

What's your payload?

^ I believe I've found a bug with

^ I believe I've found a bug with Workers CI/CD, what's the best place to report that? (I was able to reproduce the issue, and it seems related to my setup and how Workers CI is triggered)

and I guess Prom in a DO means saving

and I guess Prom in a DO means saving the state of a counter in the DO 😅

does snippets support kv? If not is

does snippets support kv? If not is there any plan to add this support?

Workers as your fallback origin | Cloudf...

When your setup is like: subdomain.customerdomain.com -> fallback.domain.com, Worker Routes sees the incoming request as "subdomain.custerdomain.com/" and thus fallback.domain.com/* wouldn't match. You need a wildcard as per this guide: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/start/advanced-settings/worker-as-origin/ just be careful to exclude your own subdomains first or use a dedicated domain/zone for cf for saas...

Thread

Do you mind if I DM you a few questions?

adding assets to workers is sick and i'

adding assets to workers is sick and i've got it working. but not_found_handling = "single-page-application" doesn't seem to quite work without handling in the worker? Am i right about that? You want to bind it and hand the request back to assets to get the correct asset.

Workers Builds! 🙌 can't seem to get Bun

Workers Builds! 🙌 can't seem to get Bun working though... even tried setting BUN_VERSION build env var, tried .tools-versions. Anyone get this working? Also a retry button on failed builds would be very helpful!
No description

Trying out the new workers with assets.

Trying out the new workers with assets. Just initiated a solid-js project as described in the tutorial and deployed. Looks like static assets aren't cached by default Cache-Control: public, max-age=0, must-revalidate. How do I configure the worker with a proper cache-control header for hashed static assets built by the framework?...
No description

Slight bug with new worker CI/CD: adding

Slight bug with new worker CI/CD: adding a root directory for the worker in the inital drawer page doesn't work, it goes back to / after you create the integration. Editing it afterwards works fine.

Workers should be fine - got anymore

Workers should be fine - got anymore info?
Next