service-worker-gateway icon indicating copy to clipboard operation
service-worker-gateway copied to clipboard

Support DNSLink Gateway Mode

Open lidel opened this issue 8 months ago • 0 comments

Right now, SW gateway inspects window.location.hostname and if domain matches subdomain gateway convention (https://specs.ipfs.tech/http-gateways/subdomain-gateway/) then runs in subdomain mode, using the CID from {cid}.ipfs.inbrowser.link as the content root.

One can imagine we could also check if the hostname has a valid DNSLink, and if present, use that as the content root.

This would effectively implement https://specs.ipfs.tech/http-gateways/dnslink-gateway/ allowing people to host static HTML + JS on their own domain, and control updates of the loaded website / web app via DNSLink TXT record (which itself could also point at IPNS name).

Ref. original PoC by @jimpick at https://bsky.app/profile/jimpick.com/post/3loueifgzlk2f

cc @2color @SgtPooki

lidel avatar May 13 '25 21:05 lidel