cloudflare-workers Questions

3

I have a CloudFlare Worker where I have environment variables set in the CF Settings..Environment Variables interface. I also have this wrangler.toml In my worker's index.js I have code reading th...
Heilungkiang asked 20/4, 2021 at 14:46

4

Solved

I am following this guide to get secrets added to my prod environment with cloudflare workers: https://developers.cloudflare.com/workers/platform/environment-variables/#comparing-secrets-and-enviro...
Gainsay asked 28/2, 2022 at 16:49

1

Solved

I've created an API using Cloudflare Workers and it uses their KV service. The KV namespaces are defined in the wrangler.toml file but I'm unsure if it is safe to commit that file with the kv_names...
Salutation asked 27/5, 2023 at 16:35

1

Solved

I am trying to test run a cloudflare worker locally using wrangler dev (although I have the same issue when running npm start), and I keep getting an EPIPE error. The error message and code are bel...
Hornbill asked 18/5, 2023 at 14:46

1

I'm creating a cache-proxy with Cloudflare Workers. I'm using a self made class instance to abstract Airtable queries, that require couple of secrets to be instantiated. Now I must instantiate it i...
Olympian asked 24/2, 2023 at 9:27

0

Hi I'm getting the following error in Cloudflare workers A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected ...
Earley asked 18/3, 2023 at 19:23

1

Solved

I want to fetch an asset into R2 and at the same time return the response to the client. So simultaneously streaming into R2 and to the client too. Related code fragment: const originResponse = awa...
Tabanid asked 26/1, 2023 at 8:40

1

There is problem, i keep encountering in cloudflare. It says - authentication error (code 10000) while logging to my cloudflare dashbord. don't know why that's happen,but i searched for that proble...
Matronly asked 15/1, 2021 at 3:22

3

Solved

I'm trying to use cloudflare workers to perform authenticated actions. I'm using firebase for authentication and have access to the Access Tokens coming through but since firebase-admin uses nodejs...

1

I understand eval string-to-function is impossible to use on the browsers' application programming interfaces, but there must be another strategy to use third party dependencies without node.js on ...
Jaques asked 15/5, 2022 at 14:50

2

Solved

Ran wrangler dev and it doesn't seem to bind Worker KV: ERROR in /src/handler.ts ./src/handler.ts 16:8-17 [tsl] ERROR in /src/handler.ts(16,9) TS2304: Cannot find name 'generalKV'. Here is handle...
Watch asked 1/11, 2021 at 5:51

1

Solved

I have a simple NodeJS app (A Cloudflare Worker). In the main typescript file (index.ts) I import the handler module which has this as the first line: const Monitor = import('ping-monitor') ping-mo...
Phantasy asked 29/11, 2021 at 22:34

1

Solved

If you see the pricing section of Cloudflare Workers here in the free plan they have the following Up to 10ms CPU time per request and in paid plan following Up to 30s wall time per request Typ...
Shastashastra asked 10/8, 2021 at 2:31

1

Solved

I have to access a nested element using HTMLRewriter in a Cloudflare worker. Example <div data-code="ABC"> <div class="title">Title</div> <div class=&quot...
Tesler asked 24/6, 2021 at 11:23

2

Solved

Hello I have deployed my Vue.js app to Cloudflare workers using the following commands: wrangler generate --site wrangler publish --env dev This is my wrangler.toml: account_id = "xxx" name = "...
Guereza asked 17/10, 2019 at 12:9

1

I was getting the following error with the Nodemailer package in a Cloudflare Worker and wanted to document what I found. Module not found: Error: Can't resolve 'child_process' in '~/node_modules/n...
Westernmost asked 26/9, 2020 at 13:31

2

Solved

I have a following wrangler.toml. When I would like to use dev or preview (e.g. npx wrangler dev or npx wrangler preview) wrangler asks to add a preview_id to the KV namespaces. Is this an identifi...
Inscrutable asked 9/8, 2020 at 23:24

3

Solved

I managed to deploy my first cloudflare worker using serverless framework according to https://serverless.com/framework/docs/providers/cloudflare/guide/ and it is working when I hit the cloud. Dur...

2

I'm using Next.js v9 and would like to take advantage of Next's serverless deployment option by using my application with Cloudflare Workers. From the Next.js docs, I know that every serverless fu...
Hamrick asked 2/12, 2019 at 5:51

1

Solved

The usual Date object on Cloudflare's workers, all return 1 jan,1970... What is the proper way to get the current datetime in a workers' code? Thanks, G
Karbala asked 21/10, 2019 at 17:1

1

Solved

I am trying to query mongodb simple findOne in using mongodb. Cloudflare worker is giving 10ms CPU time but during preview/publish throwing error I have tried installing these npm modules npm i ...
Bamboo asked 5/10, 2019 at 14:3

1

Solved

I'm trying to use a Cloudflare Worker to proxy a POST request to another server. It is throwing a JS exception – by wrapping in a try/catch blog I've established that the error is: TypeError: A ...
Colville asked 30/4, 2019 at 12:26

1

Solved

Specifically I am interested in changing all responses with code 403 to code 404, and changing all responses with code 301 to 302. I do not want any other part of the response to change, except the...
Liew asked 23/7, 2018 at 19:14

2

Solved

I want to dynamically add http-headers via CloudFlare workers ONLY for the first time visitors. For example these headers: Link: </path/to/file.css>; rel=preload; as=style; nopush Link: <...

1

Solved

I'm writing a Cloudflare Worker that needs to ping an analytics service after my original request has completed. I don't want it to block the original request, as I don't want latency or a failure ...
Gnathic asked 14/3, 2018 at 20:21

© 2022 - 2024 — McMap. All rights reserved.