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

Why i can't able to import requests module??

is there any way to import requests module or not??
No description

Regarding the speed limit for individual IP addresses by workers, is it possible to restrict their a

Recently, I have been trying to build a high-performance API service using Worker (I am already a paid user of Worker). However, I still encounter a rate limit of 429. I can only make a maximum of 2000 requests per minute. Additionally, there is a firewall event with an Rule ID related to Worker in my firewall settings that I cannot disable. Can you provide me with a method to disable this restriction? I am confident that only authorized users can access my worker....

Using Worker to invalidate all objects under an URL

I never used Workers before. Let's say I have an external domain example.com. Can I use workers to cache some resources under this domain. Can I use workers to invalidate all resources under this domain? Thanks...

Unable to Create File from R2 to Openai

Following these directions, I'm not able to get create file to work. https://developers.cloudflare.com/workers/tutorials/create-finetuned-chatgpt-ai-models-with-r2/ I'm getting "400 'file' is a required property". Here is my code:...

Service pattern with Hono.js

Hey Im coming from Expressjs backend dev background, and its a bit confusing to me how to implement service pattern with Hono js on top of Cloudflare workers. What i want to achieve is create a singleton object of thirdparty SDK service in /services/engine.ts file. ```js...

How to set metaData to R2 object

I am using aws s3 based API to interact with r2 object. I am trying to set metadata like this ``` new PutObjectCommand({...

worker.fetch failing on node18.x + GitHub actions

Hey 👋 This minimal test using unstable_dev and worker.fetch works locally, but fails in GitHub actions https://github.com/kysely-org/kysely/tree/master/test/cloudflare-workers ...

Looking for a Trigger/Routes/Add a route link

I am using the Cloudflare. I deployed the project on the Cloudflare. But I didnt display on it. I had get the blank page. So I have to set the text/html to application/javascript on the router. So I am looking for a Trigger tab, But I cant find the Trigger tab anywhere on the Cloudflare. Where is it?...

Worers outcome: canceled

Hello, I am struggling a bit with my new API made with hono using CF workers. At some random times, for a few minutes, all requests time out and from the worker logs I see that their outcome is cancelled. ...

Worker Fail Open Question

Had a small question about how "Fail Open" for worker routes works. It states that when it reachs request limit, additional requests will bypass to the origin, but what is the "origin." In particular, if the origin is proxied prior to the worker route, am I safe in the sense that the result with still be proxied via cloudflare? Just wanted to make sure

subdomain wildcard first level

I was looking at this post and am encountering a similar issue however just with the first level sub domain. I have a worker that I want to reply to *-val.mydomain.com/* I've tried setting this up as both a custom domain and a worker route, but no matter what combination I try I get a 522 error. Do I also need to go the Advanced certificate path?...

Redirect Pages Request to Worker only if header is set

Hey, Is there any way to redirect some request that are usually served by Pages to a Worker. I would like to select those request depending on if a HTTP header has a specific value. I know I could use Worker Routes, but that would mean that all request would hit the worker, not only request with that header, which would be overkill since only a minority of request will actually include the header. In the best case it should not do an actual redirect, but just handle the request differently on the server side....

Dynamic require of "cloudflare:workers" is not supported please help

Trying to implment RPC --> here is my wrangler --> compatibility_date = "2024-04-19" compatibility_flags = ["nodejs_compat"]...

worker failed to prewarm

is there a current known issue with wrangler dev --remote? I'm getting â–² [WARNING] worker failed to prewarm: Service Temporarily Unavailable...

CORS Error - Trigger OPTIONS

So my server is hosted with workers and my client is hosted on another domain so keep running into the same errors regarding CORS. Here's a code snippet of the function that's causing the error. If anyone has any advice let me know. ``` async def on_fetch(request, env): if request.method == "OPTIONS":...

Unable to access site using cloudflare/puppateer

Accessing a url that returns an X-FRAME-OPTIONS header or some other policy prevents cloudflare/puppateer from loading that page. I am trying to build a workers api that takes a screenshot, and it does work for some urls, but it does not work for other sites. The screenshot renders an error (see screenshot attached). Would it be possible to use some kind of plugin to bypass those policies and render the page in cloudflare workers?...
No description

Time range can't be wider than 259200s, but it's 2592000s"

Could you pls help me? I need upgrade my account for premium? What plan I need?

Thoughts on this approach with stripe checkout on a cloudflare page with workers

I have a simple product I'm selling - its packaged software hosted in a private github repo - with a one off payment or yearly subscription to access it. I have a cloudflare pages site (https://codylabs.io/) and want to take payment in a fully hosted payment gateway (stripe checkout https://stripe.com/en-pt/payments/checkout). Stripe checkout has a payment completed webhook, so after payment and that webhook is sent, I want to fire up a cloudflare worker to provision access to the github repo an...

Subrequests metrics

Hi there, I wrote a workers to cache request from my graphql endpoint. I mostly following the example here https://blog.cloudflare.com/introducing-the-workers-cache-api-giving-you-control-over-how-your-content-is-cached As a result I correctly get cached request from the Cloudflare Cache API with status "cf-cache-status: HIT"....

Developing worker to send email locally

I am developing a worker locally to send an email that uses import { EmailMessage } from "cloudflare:email"; However when i run wrangler i get the error Uncaught Error: No such module "cloudflare-internal:email". Is there any way to run this locally? or do you have to deploy it to test?...