-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for web archive rendering #861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #861 +/- ##
==========================================
- Coverage 47.82% 47.77% -0.05%
==========================================
Files 351 351
Lines 11292 11304 +12
Branches 1889 1891 +2
==========================================
+ Hits 5400 5401 +1
- Misses 5705 5712 +7
- Partials 187 191 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Plan:
The goal is to not have this PR wait while we do infrastructure work to make playing JS as safe as possible. |
|
This issue is related: #863 |
|
Can we actually hide this behind a feature flag? We had suggested that we would say "if WebArchive and |
Set up a special treatment for archive files (currently .wacz, .zip, and .7zip). This is very MVP and currently is trying to show the ReplayWeb example file for any archive uploaded to Permanent. This doesn't work because the "service worker" is not loading correctly.
In order to render the replay-web-page we need a web worker to run and we cannot use a remote one because of CORS, that is why we are adding the files locally.
Co-authored-by: Liam Lloyd-Tucker <liam@permanent.org>
We need to style the embed to actually fill the screen
We don't want to try to render zip files as web archives, so we're introducing a brand new type.
890bc79 to
aaddd8c
Compare
For various reasons (security as well as a desire to avoid packaging vendored code in our repository) we would like to render replay via a hosted copy instead of loading js from our domain. This is particularly important for ensuring replayed pages aren't able to access user data / cookies that are scoped to permanent.org This commit tests that approach. Before we truly release this feature we will want to make the replayUrl based on a configured value (e.g. not hardcoded to `dev.replay.permanent.org`).
aaddd8c to
117e5d4
Compare
This PR captures the outcome of our 2025 hackathon! Go team!
It adds support for a new record type: Web Archive, including the ability to render that content via detail view.
Before this PR is merged we should do some additional testing related to javascript security.
We should also consider using an
npmpackage instead of loading the vendor script directly.