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
GGerbuuun5/14/2024

Programmatic PDF generation on worker

Hi everyone, I've been looking for some way to generate PDFs within a worker script. Currently I use the browser rendering api to create PDFs of a page but according to the dashboard a single invocation takes 6 seconds... There must be a better and faster way right?...
BBarbara885/14/2024

Promise not working in JS worker

Hi I have am using the S3 client in a Cloudflare worker ```js import {GetObjectCommand, ListObjectsV2Command, ListObjectsV2CommandOutput, S3Client} from "@aws-sdk/client-s3"; // Create client...
LLemοn5/14/2024

node

Hey, I'm trying to deploy my worker but I keep getting this 11 errors all similar to this one:
The package "string_decoder" wasn't found on the file system but is built into node. Add "node_compat = true" to your wrangler.toml file and make sure to prefix the module name with "node:" to enable Node.js compatibility.
...
YHYazar Haber5/14/2024

Site Complaint

İlgili link kişisel verilerimi barındırdığı için profilin silinmesini talep ediyorum. Profil fotoğrafı ve diğer bazı bilgiler benim ile ilgilidir. https://www.testalemi.com/profil/15455 egemenkeydaltr@gmail.com...
Ccj5/13/2024

[solved] How to upload vars along with a wrangler deployment

I know we can use .dev.vars for local development. But how do I set the env vars for production and development deployment? I can't add them to wrangler.toml as it gets commited to git.
Ccj5/13/2024

How to wrangler deploy a dev worker?

I would like to deploy two workers, one for production (which would have a custom domain) and a dev worker with no custom domain.
Ccj5/13/2024

Failure in deploying ratelimit - must have `namespace_id` even though it is defined in wrangler.toml

Here is my wrangler.toml ```toml [[unsafe.bindings]] name = "RATE_LIMITER" type = "ratelimit"...
Aaziz5/13/2024

PostGIS

Hello all! Do you know how activate postgis extension on postgres?
JJannis5/12/2024

Workers platform broken for requests with cache mode no-store

Hi, an update a few hours ago completely broke my app with the following exception: Error sending request: Unsupported cache mode: no-store. It uses an external library (@azure/cosmos) which apparently specifies this cache options when creating fetch requests. It is known that caching is not supported by Workers, but please make sure the option does not break the requests any more.
AAutumnCicada5/11/2024

When running wrangler dev are HTTP request headers like CF-Connecting-IP supposed to be added?

I'm testing an implementation of a rate limiter built using DOs and CF-Connecting-IP is not present along with other request headers. Is this supposed to be added in the test environment?
Ddrowhann5/11/2024

Request from Quora bot for ogImage is getting blocked by cloudflare

I noticed some time ago that our website's ogImage is not being fetched by quora. And it turns out that, the request from quora bot is getting blocked by cloudflare as unrecognized bots. It's probably a security measure. But, i didn't find any way to allow Quora to fulfill the request. I tried adding custom rules in Websites -> [domain] -> Security -> WAF. But, it don't seems to resolve the issue. Anyone else facing this issue? Any solution how to solve this?...
ATAnkita Tudubucket5/11/2024

Conflict between Cloudflare Workers checks & Cloudflare docs

I'm using Python for my Worker, and This Cloudflare page described that I can use aiohttp package, but when i include that package along with fastapi in requirements.txt, I have the error: " found in requirements.txt. Note that requirements.txt should contain package names only, not version specifiers. I tried many ways to remove the error: - Remove the requirements.txt, after that my Worker return ModuleNotFoundError error - Add packages back requirements.txt (or even empty the file), after that Wrangler still said " found in requirements.txt. Note that requirements.txt should contain package names only, not version specifiers....
No description
Ttskuzzy5/10/2024

Calling a private service behind a cloudflared tunnel

I currently have service running in a private VPC on AWS that I want to talk to from CloudFlare Workers. So I set up a cloudflared tunnel to it. I got everything working by setting up a public hostname and protecting it with a "Self-Hosted" Application using aa service auth token. However I'm a bit uncomfortable with having a public DNS record (even if it's technically protected by the Application policies). e.g. what if someone accidentally deletes the Application? Is it possible to get rid of the public hostname altogether and call the *.cfargotunnel.com address directly from Workers?...
Mmoonchav5/10/2024

Are there analytics for which endpoints on my worker are being requested, and request methods?

I want to know API endpoint on my worker is being requested the most, as well as the type of request method being used - is this possible or are the workers analytics limited to the number of requests hitting the worker domain?
Rr2d25/10/2024

Using `R2 + image transformation API` vs the `Images` service

Are these effectively the same but with a lower storage cost for R2 storage? What are the advantages to using the Images API for storage vs the former?
FFlinkpfote5/10/2024

D1_ERROR: Wrong number of parameter bindings for SQL query.

Hello, can someone tell me what I'm doing wrong that I get this error? If you need more Infos please ask. ``` export default {...
Sswitz5/10/2024

Helsinki workers down?

Any way to force requests to alternate paths when one worker region is down?
CCorsix👾5/10/2024

Post request, getting 405 error not allowed

I have a CF pages site that sends a post request to a worker with a api with Hono framework, when i run both worker and page localy it workes no problem, but when its remote on the cloud, and i send the post request form the page to the worker it gets a 405 error on the page. i have no idea why.
Sstibbs5/10/2024

How to rapidly validate if a JS package will work on Workers runtime?

Like the old 'Works on Workers' catalogue which disappeared. Node.js / javascript / typescript packages. I know this page exists: https://developers.cloudflare.com/workers/runtime-apis/nodejs/ but without a deep dive into other packages you cannot identify whether a package will 'just work'. As an example of two popular packages, stripe works but @sendgrid/mail doesn't Is it a matter of trial and error? Or Google [package] cloudflare workers each time and hope someone has written a blog post? That will become exhausting quickly....
RRobinH5/9/2024

Newbie Assistance with Worker Code

Hello - I'm fairly new to Cloudflare and I'm making my first attempt at using a Worker. The goal is to have the Worker add a SAS token, from an Azure storage account, anytime a specific URL is processed in CF. For example, if the URL is sub.mydomain.com, add the SAS TOKEN (stored as a variable) so that the URL becomes sub.mydomain.com?<SASTOKEN>. I found a blog post where someone explained how to do this: https://www.eliostruyf.com/cloudflare-serve-private-azure-storage-blobs/ Using the code provided:...
Next