divby0
Explore posts from serversCDCloudflare Developers
•Created by divby0 on 4/5/2024 in #workers-help
How does the caches.default interact with fetch by default?
![No description](https://cdn.answeroverflow.com/1225700591284649994/image.png)
1 replies
CDCloudflare Developers
•Created by divby0 on 10/9/2023 in #pages-help
Make stack trace use the provided sourcemap (single file, [[path]].js + .map)
I have configured a build that yields a
functions/[[path]].js
and a functions/[[path]].js.map
file. How do I make cloudflare actually use the sourcemap so I can read and unsterand them when an error happens?
Currently for my small project I am just hitting a webhook with the stacktrace that sends the stacktrace as a telegram to me but most of the time they are not really readable.2 replies
CDCloudflare Developers
•Created by divby0 on 7/3/2023 in #workers-help
Reverse Proxy for blog returns 301 on custom domain, but works correct on preview url?
I've got the domain rank-hub.com added as a custom domain for a worker and a blog lives on ghost.rank-hub.com.
The worker script creates a proxy request and returns its result so I can have rank-hub.com/blog proxied to ghost.rank-hub.com/blog.
This is very easy with workers and I appreciate it, but I am probably missing a little something as the setup works on the preview url: https://rank-hub-ghost-proxy.divby0.workers.dev/blog but not on the live one https://rank-hub.com/blog
Somehow cloudflare returns a 301 to my request when I use the apex domain (so I get redirected to blog.rank-hub.com). When I use the preview url, the content is correctly proxied. What am I missing?
Worker script:
16 replies
CDCloudflare Developers
•Created by divby0 on 6/12/2023 in #workers-help
HTMLRewriter treats self closing tags like <img/> as text
I am using HTMLRewriter to get the plain text of a website. Using the following code listening to the
text
event, it results in uggly <img ....../> or <iframe .../> being included in my result:
After transforming an html response, this is how response can look like:
1 replies