Skip to the content.

Catalog and media retrieval sequence

Catalog access and public bytes are separate security boundaries. List enrichment reads children per image/SVG to choose a thumbnail; detail already has children. Forwarded relative URLs are resolved against MEDIA_API_URL. Local /m/** validates keys, sends nosniff and sandbox CSP for active types, supports HEAD, ETag revalidation and single byte ranges. CloudFront uses private S3 through OAC; this is configured topology, not evidence of live deployed state.

Legend: all drawn relationships are source-verified; branches are conditional execution paths. No inferred service is drawn.

sequenceDiagram
  participant UI as Admin media UI
  participant A as Admin route / service
  participant N as Web media routes
  participant L as MediaLibrary
  participant C as Catalog
  participant B as Local CDN handler or CloudFront
  participant S as Filesystem or S3
  UI->>A: Bearer GET assets or assets/id
  A->>A: requireMediaAdmin
  alt Forward mode
    A->>N: Bearer GET media catalog
    N->>N: requireMediaAdmin
    N->>L: listAssets or getAsset/listChildren
  else Local mode
    A->>L: listAssets or getAsset/listChildren
  end
  L->>C: Read asset records and children
  C-->>L: Records
  L-->>A: Records through selected host
  A-->>UI: publicUrl and previewUrl plus catalog data
  UI->>B: Public GET media URL (no admin token)
  B->>S: Read object (CloudFront on cache miss)
  S-->>B: Bytes
  B-->>UI: Media response

Source evidence