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

Worker Rate Limiting API Not Triggering for IPv6

We noticed when using the Rate Limit api/binding for workers that the rate limit never seemed to trigger for IPv6 traffic. It only triggered for IPv4 traffic. This was tested using cf-connecting-ip and x-real-ip as the rate limiter key. Is there a different header or method we can use to reliably rate limit by IP? Not sure if our IPv4 settings for the site are causing the issues. We are aware that shared IP's is a common issue with rate limiting per IP, for our use case this is not an issue....

Worker can't bind to EU bucket

When deploying my worker it says it finds the bucket, but when I then go to the settings of the worker in the dashboard it says there is no R2 buckets bound to the worker. If I try to update the environment variables of the worker I get the following error message: "workers.api.error.bucket_not_found (Code: 10085)". Any idea why this is? ```toml ... ...

how to convert puppeteer.HTTPResponse to cloudflare Response

I am trying to convert a puppeteer.HTTPResponse into a cloudflare response. Before I moved to cloudflare workers, I was able to do this with the following code. However, currently with cloudflare I get the following error: ReferenceError: Buffer is not defined Code that previously worked:...

How to bypass worker rate limits for IP address (for testing)

Hello! We recently started using workers and have subscribed for the $5/month workers paid plan. Our 3rd party security testing partners have told us they're hitting rate limits, even though we have an IP rule allowing them through the WAF, and custom rule set to skip rate limits from their IP. ...

Submit form to Worker to store in R2

I've have been dealing with this for hours now and I'm so sick of this Worker code Literally copy and pasted from the docs as what I wrote would not work, but this doesn't work either. ```js...

Queues Throttling

Hi, I am new to serverless, so I am not familiar with design patterns (I'd love to hear where can I learn more of this). I am wondering what's the best way to throttle API calls. Let's say I am using thirdparty API endpoints, one which lists all of the objects and the other query an object. My goal is to list all of them, push them into a queue, then have a consumer slowly querying each object, without finishing them as fast as possible in one goal. Is using "delay messages" the way to go? Assigning different delays while pushing them to the queue to achieve throttling?...

Got 403 when adding worker env

[SOLVED] After i googling i found similar issue like in this thread (https://community.cloudflare.com/t/403-error-when-trying-to-add-a-worker-environment-variable/654279/1) Got API Request Failed: POST /api/v4/accounts/d3bc1986e40b2276454650196d02e3f3/workers/scripts/cf-bucket-api/versions (403) tried login logout and the result is same. Can anyone help? i confuse because my account make this worker but why got 403...
No description

Can't get CF transform via workers to do anything

Following this guide: https://developers.cloudflare.com/images/transform-images/transform-via-workers/#an-example-worker Using an unbelievably basic worker: ``` addEventListener('fetch', (event) => { event.respondWith(handleRequest(event.request));...

SSL routines:ST_CONNECT:tlsv1 alert protocol version

Running into an issue here with workers, where I cannot curl specifically in San Francisco. When I VPN somewhere else it works. I have tried on multiple different machine ``` curl -vv https://oai.hconeai.com * Trying [2606:4700::6812:cba]:443......

Cloudflare keeps renewing SSL certificate for deleted worker

Hi, I had worker deployed as custom domain like test.domain.com, I deleted this worker about 6 months ago but cloudflare keeps renewing SSL cert for this subdomain. How can I stop it?...

Run worker locally (with Wrangler) with MySQL Docker image

Our current setup is: - Production using PlanetScale database with Prisma and the @prisma/adapter-planetscale adapter - Development using a simple MySQL docker image When we want to run our Worker(s) locally, it gives errors, because plain Prisma with MySQL is not supported on the (local) Cloudflare Workers runtime:...

I renamed my Worker in Dash and wrangler.toml, but became unauthorized in wrangler and can't deploy

Hello, I deploy my worker via CLI. I renamed one of my workers in Cloudflare Dash. I updated the wrangler.toml....

Understanding Cloudflare websockets costs

Hi there, is there documentation on the costs of using websockets in my worker? I found some old articles, but nothing new and/or clear on what my actual costs are going to be. Like do I incur costs if I keep a connection open? Any help would be appreciated....

Worker Routes not working

I'm trying to create an URL shorter using Cloudflare Worker. However, when I try to access the URL, the Worker does not forward to other site, it just display my not found page. For instance, https://hoaq.id.vn/s/skin will forward to https://drive.google.com/file/d/1BokisPpuP9fQlkaupkdwlUacDQMLDTMy/view?usp=drive_link Here is the code ```js...
No description

"open devtools" not showing anything?

i'm wanting to debug my local wrangler dev instance, and after doing some reading there does seem to be an option of debugging in chrome devtools, or in vscode i'm wanting to debug in devtools, but after pressing d to open Devtools, the sources has an index.js file which is empty anybody know whats going on, or have i just not set something up properly?...
No description

fetch() not working

fetch doesnt seem to return anything
No description

Invalid credentials. even though I pass the Bearer

Hello, I'm facing an issue that when I do a fetch request (ofetch, native fetch, does not matter) and I am passing Authorization: headers, the response is: ```...

Validating JWT in Cloudflare Pages (CF's tutorial doesn't work when deployed)

I'm following https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/validating-json/ (JavaScript). I understand it's for Express, but I've removed the Express parts and adjusted it for SvelteKit to be deployed in Cloudflare Pages. But when deploying I got this error: ``` 22:06:07.363 > Using @sveltejs/adapter-cloudflare 22:06:07.427 ✘ [ERROR] Could not resolve "http"...

self fetching on workers and client sides

I am writing a fetch request that can be called from both the server and client with the following code. I am using Nuxtjs 3. ``ts const {data, error } = await useAsyncData( 'API_FORWARD_UID', (): Promise<IUIDGetResponse> => $fetch(${config.public.baseUrl}/api/forward/${uid}`, {...
No description