Learning some cool things about Cloudflare workers as I try to preserve note.chiubaca.com as part of my blog rebuild.
I don’t need to maintain another astro project for my notes and my main blog AND have a sub-domain for my notes
note.chiubaca.com can be a worker that proxies a request from chiubaca.com/fleeting-notes. this is such a eureka moment for me.
It’s quite nuanced though as we also need to proxy all the CSS and JS that comes along with it. This is where I’ve learnt about Document <base>
where all ur website relative urls can reference a different website.
To inject this tag we can use Cloudflare HTMLRewriter
to inject this into the response which we proxied across, though, as we also need to proxy all the CSS and JS