Fastly Compute@Edge router for wildcard subdomain routing on Divine Video.
This is the public edge, not the ArgoCD-managed GKE stack. Production ATProto rollout depends on this service being published separately from divine-iac-coreconfig.
This edge router handles incoming requests to *.divine.video and *.dvines.org, routing them based on the subdomain:
- Apex domains (divine.video, dvines.org) → passthrough to origin
- System subdomains (www, api, cdn, admin, etc.) → passthrough to origin
- Username subdomains (alice.divine.video) → profile lookup and redirect
- Username routing: Routes
username.divine.videoto user profiles - NIP-05 support: Serves
/.well-known/nostr.jsonfor Nostr identity verification - KV-backed lookups: Username data stored in Fastly KV Store
- System subdomain passthrough: Reserves common subdomains for services
Requests to username.divine.video/.well-known/nostr.json return NIP-05 responses:
{
"names": {
"username": "pubkey-hex"
},
"relays": {
"pubkey-hex": ["wss://relay.example.com"]
}
}- Rust with
wasm32-wasip1target - Fastly CLI
fastly compute servefastly compute publish --non-interactive && fastly purge --allDeploy this after the public handle state has been published by divine-name-server, because it reads Fastly KV to serve /.well-known/atproto-did.
Username data is stored in the usernames KV store with this structure:
{
"pubkey": "hex-encoded-pubkey",
"relays": ["wss://relay1.example.com"],
"status": "active"
}Reserved subdomains that passthrough to origin:
- www, api, cdn, admin, support, relay
- analytics, blossom, funnel, stream, media, gateway
MIT