Skip to content
Advertisement

Tag: cloudflare-workers

Hanging promise canceled

I’m trying to set Cloudflare’s workers to track the circulation of some ERC20 tokens as an exercise to learn web3 and wasm. Thought it could be simple enough, but about 90% of the time so far has been trying to solve this elusive error I look for additional information online, but it seems my error is from a different type(?).

Cloudflare workers CORS ignored

I created a SendGrid form using CF Workers and set (for testing) Access-Control-Allow-Origin”, ‘*’ but it’s being ignored on the frontend: Do I need to also add it to the AXIOS POST request? Here’s code from my workers file: And here’s the AXIOS request: It all works fine using Insomnia and the headers are visible there: Answer You’ve correctly set

How to replace jsp tag with HTMLRewriter

I am kinda new to Cloudflare’s HTMLRewriter function. I am trying to replace a jsp tag with some html using HTMLRewriter. More precisely, <%= “${header}” %>. Is there a way I could possibly do this? I managed to replace a header tag <header>, but not jsp or some other string. Answer Unfortunately, this JSP tag is not valid HTML and

TypeError: Incorrect type for the ‘headers’ field on ‘RequestInitializerDict’: the provided value is not of type ‘variant’

I’m new to JavaScript and I’m trying make a Github API Gateway for IFTTT(cause it can’t modify header) with JS on Cloudflare Worker. Here’s the code: And I got this error when I tried to run it: This is an older version which run well but with less flexibility: The only difference seems to be apiRequest, but I don’t know

Advertisement