I wanted to control my own mastodon identity so I can easily move if a server dies. So my identity is now @idisposable@github365.com
To have that mapped to my current identity, we have to implement the webfinger protocol at github365.com which is a domain I put up for fun a long time ago. That site is actually a fully static HTML file hosted on my bluehost.com account.
I could put up a static file named webfinger in the /.well-known/ directory, but that would mean every request would point to the same json response (and thus the same identity. See @maartenballiauw 's blog post blog.maartenballiauw.be/post/2022/11/0…
So, since ALL my BlueHost stuff is fronted by @Cloudflare (because who doesn't want awesome performance?) I thought why not use a CloudFlare Worker to handle the webfinger protocol at the edge?
That means that I can setup a worker and deploy it at a route that I control on the CloudFlare dashboard. Obviously I don't want to manage all the mappings in the source of the worker, so why not use the CloudFlare KV stuff?
After WAY too much noodling around, I've got it working using the typescript API provided by @CloudflareDev at developers.cloudflare.com/api to construct a worker using Wrangler.
I'm happy to say that github365.com/.well-known/we… now works exactly the way I want, and as a learning experience for myself and others, I've fully released the worker sources and documentation at github.com/IDisposable/cl…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Marc Brooks 马博江

Marc Brooks 马博江 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @IDisposable

Nov 12
The fact that people are still trying to solve for competitive parity between two SHITTY CHOICES is the entire problem.
As long as we keep letting A or B decide if the map is fair, we're going to automatically end up with a system that is only "fair" to A or B (whichever has the crown at the moment), instead of a districting that lets ANY party be treated fairly
We need to do a simple geographic subdivision that retains equal population representation (or if we're going to DECIDE that land ownership also means something, quantify that IN LAW algorithmically).
Read 22 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(