feat(branding): derive colour and logo from the signup domain
Customer branding (#155), steps 1–6: the registry reads the home page of the workspace's company domain and stores its CI colour and logo. - Domain: the admin's address, else the most frequent member domain (tie: alphabetical); free mail never counts; no domain, no branding. - Fetch (internal/branding): own transport (no proxy, no trace headers, no cookies), https on 443 only, public IPs only, checked on every dial after DNS, ≤ 5 redirects within the registrable domain, 10 s per request, HTML ≤ 2 MB, images ≤ 1 MB, User-Agent BreakpilotBranding/1.0. - Colour: theme-color without media, the manifest's theme_color, else the logo's dominant colour; white, black and grey are skipped. - Logo: manifest PNG ≥ 128 px, apple-touch-icon, PNG/ICO/JPEG icon, /favicon.ico; stored as a 256×256 PNG, never SVG. - POST /v1/tenants/{id}/branding/derive ("Neu ermitteln"): synchronous, replaces a manual choice and counts as acknowledged. - Background: tenant creation and trial requests queue the workspace; RunBranding derives queued ones every minute, retries network failures twice, 6 h apart. Audit branding.derived / branding.failed. - Switches: BRANDING_DERIVE=on (off by default), BRANDING_BACKFILL=on queues every customer workspace without branding once at start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9685ec0475
commit
df2d4a1949
15 files changed
+1421
-1
No files matched your search
@@ -231,6 +231,8 @@ func main() {
|
||||
go app.RunMail(ctx, 20*time.Second)
|
||||
// Module users (t81): once per Europe/Berlin day.
|
||||
go app.RunModuleUserCount(ctx, 15*time.Minute)
|
||||
// Customer branding (#155): queued workspaces, when BRANDING_DERIVE=on.
|
||||
go app.RunBranding(ctx, time.Minute)
|
||||
|
||||
go func() {
|
||||
slog.Info("tenant-registry listening", "addr", cfg.Addr, "env", cfg.Env, "store", kind)
|
||||
|
||||
Reference in new issue
Block a user