~james/core

core/web/src/lib/server/camotarget.ts -rw-r--r-- 393 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
7
import { isPublicHost } from "#lib/publicFetch.ts";

// markup renders client-side, so no renderer can hold the camo secret and
// the web route signs on demand, a public oracle by construction. this
// bounds what that oracle can aim the worker at. camo/src/index.js mirrors
// it, the two deploy independently
export const signableTarget = (url: URL): boolean => isPublicHost(url.hostname);