Skip to content

Render screenshots, filmstrip and video on compare across origins#269

Merged
soulgalore merged 1 commit into
mainfrom
fix/csp-allow-cross-origin-media
May 22, 2026
Merged

Render screenshots, filmstrip and video on compare across origins#269
soulgalore merged 1 commit into
mainfrom
fix/csp-allow-cross-origin-media

Conversation

@soulgalore

Copy link
Copy Markdown
Member

The compare page loads its HAR-derived screenshots, filmstrip frames
and video from whatever sitespeed.io result server originally produced
the HAR — typically a separate origin from the one running onlinetest
itself. The helmet CSP only allowed 'self' for images and (implicitly,
via default-src) for video, so those slots rendered empty whenever the
HAR pointed at a different host. Relax img-src and add a media-src
that allow any HTTPS origin so the compare view actually shows what the
HAR captured.

Co-authored-by: Claude noreply@anthropic.co

  The compare page loads its HAR-derived screenshots, filmstrip frames
  and video from whatever sitespeed.io result server originally produced
  the HAR — typically a separate origin from the one running onlinetest
  itself. The helmet CSP only allowed 'self' for images and (implicitly,
  via default-src) for video, so those slots rendered empty whenever the
  HAR pointed at a different host. Relax img-src and add a media-src
  that allow any HTTPS origin so the compare view actually shows what the
  HAR captured.

  Co-authored-by: Claude noreply@anthropic.co
@soulgalore
soulgalore merged commit c9ff483 into main May 22, 2026
9 of 10 checks passed
@soulgalore
soulgalore deleted the fix/csp-allow-cross-origin-media branch May 22, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant