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

I am trying to add a new binding for R2 after deploying my application on cloudflare in wrangler.tom

, but my pages functions are not picking these newly added bindings and not showing up on settings tab. It doesn't allow me to edit it saying, this project's binding is managed by wrangler.toml, I did add R2 binding on my wrangler.toml. I think, due to this my c.env.MY_BUCKET is coming as undefined at run time.

API to set worker environment variable?

Hey folks, I'm looking for an HTTP API to set a Worker's environment variable. Digging into Wrangler, another member of the community found this for secrets: /accounts/account_id/workers/scripts/script_name/secrets...

Do workers support js_instructions?

For example, wait for element, fill element, click button, finish instructions.

Save Files Generated in Pages App

I'm writing a Blazor app that I will eventually host in Cloudflare pages. I'll be generating files and I don't want to lose those files. I'll be generating and appending to a mdb file and log text files. Is there a concept of persistent storage or something similar to kubernetes volumes? R2 seems to be what I'm looking for, but I don't see a way to link it to pages and generated files....

The AI gateway seems not working yet with @cf/black-forest-labs/flux-1-schnell model

The AI gateway with @cf/black-forest-labs/flux-1-schnell model produce error "AI External cannot call model". Has anyone experience the same issue? `const response = await env.AI.run( '@cf/black-forest-labs/flux-1-schnell', inputs,...

[Suggestion] Slack Notification of Deployment Results

After the build is complete, I want to be notified of the deployment results to a registered Slack webhook URL. Right now, I am running shell on the deploy command, and have implemented my own notification process inside the script....

How do I debug the worker bundle size?

Hi all, we just faced an issue with our remix.js app's worker bundle size, and we're trying to understand what are the best practices to debug this issue. Any recommendations?...

size limit - how do I check the worker size in a build folder

I use remix to create a pages project. After running npm run build, the build folder contains: /client: Biggest asset: 1,134.13 kB │ gzip: 331.80 kB...

Static assets with cache and Image Optimization

Anyone with an idea how the new feature Static Assets play along with the cache and the image optimization features like Polish and and Image resizing? I enabled it on my project 12 hours ago and I can see all of the requests have Cache status: None in the Dashboard analytics section. Could not find any docs on the topic.

Help removing workers anti-abuse rate limit from my account

Can I get some help removing or significantly increasing the anti-abuse rate limit for workers on my account? It is being triggered a lot in my security event log and blocking legitimate requests to my site. Support ticket: 01225724

Memory leak when connecting Github repo in Builds

Under Workers & Pages > [Worker Name] > Settings > Build, clicking the "Connect" button to connect a Github repo results in a memory leak. This may or may not be related to the >500 branches we have, based on the fact it seems to happen faster if the branches dropdown is clicked. Also, the dropdown only includes the first so many branches alphabetically, which isn't ideal when we have lots of branches and main is right around the middle of the alphabet. I've attached a Chrome performance check showing the memory pressure / garbage collector cycles....
No description

Service binding RPC method null

I have a project with a service binding I call like this:
const result = await ctx.runtime.env.CRYPTO.encrypt(arg)
const result = await ctx.runtime.env.CRYPTO.encrypt(arg)
...

KV not updated paid plan

i have paid for worker page but my KV not updated
No description

Failing to deploy backend (Next.js, Graphql, Prisma ORM) using Cloudfare worker [urgent]

I am trying to deploy the backend of my application using cloudfare worker, but I'm facing some issues while deploying. There were many issues before, but I managed to fix most of them, now the ones left are difficult to understand. Can anyone help me with this?

getting git-integrated CF Pages to ignore submodules

I just linked some submodules on my repository https://github.com/SpiritAxolotl/spax.zone. The submodules in the subdomains/ directory are for what open source subdomains my website currently uses (currently only two are set up). My issue is that these submodules are now cloned alongside the repository whenever I push changes, and I don't want that. I can't seem to figure out how to get cloudflare to ignore them. Is there a solution to this that doesn't involve multiple git branches or removing the submodules in the repository? thank you...

https.request is not implemented yet

I'm getting the following error on Cloudflare: Error https.request is not implemented yet Even tho https.requests seems to be compatible: ...
No description

Restrict outgoing worker traffic with whitelist

Hello, Is it possible to restrict outgoing worker traffic ? Something like a firewall after the worker I'd like to block all requests (http fetch, websocket..) except those made to specific authorized domains which i whitelisted earlier (on the cloudflare dashboard for example). The idea is to prevent any lib added to my worker from making request I'm not aware of and therefore prevent any potential data leak in the future. thanks !...

Install package from private repository

I'm developing an API with wrangler and a website with next-on-pages. I'm using a package hosted on GitHub in a private repository. Both projects failed to build because Cloudflare couldn't install that dependency. Cloudflare GitHub integration has access to all repositories in our organization; shouldn't it be able to install the package? Worker / API ```js 16:40:15.809 npm error code 128...

Set secrets via HTTP

Is there any way to set a worker secret via HTTP? I see there's something for Worker Platform but not finding much for workers except for the wrangler command, but I want to do it through code...

Workers Billing related to Execution Duration

Hi guys I've implemented a crawler using Cloudflare Workers that fits in the free plan. I've purposely designed it to fit within the free plan limits, but I still wonder if I can get billed/get a scary email from Cloudflare, with such an high Execution Duration. Does someone have insights on this?...
No description