browsertrix/backend
Ilya Kreymer adb5c835f2
Presign and replay (#127)
* support for replay via replayweb.page embed, fixes #124

backend:
- pre-sign all files urls
- cache pre-signed urls in redis, presign again when expired (default duration 3600, settable via PRESIGN_DURATION_SECONDS env var)
- change files output -> resources to confirm to Data Package spec supported by replayweb.page
- add CrawlFileOut which contains 'name' (file id), 'path' (presigned url), 'hash', and 'size'
- add /replay/sw.js endpoint to import sw.js from latest replay-web-page release
- update to fastapi-users 9.2.2
- customize backend auth to allow authentication to check 'auth_bearer' query arg if 'Authorization' header not set
- remove sw.js endpoint, handling in frontend

frontend:
- add <replay-web-page> to frontend, include rwp ui.js from latest release in index.html for now
- update crawl api endpoint to end in json
- replay-web-page loads the api endpoint directly!
- update Crawl type to use new format, 'resources' -> instead of 'files', each file has 'name' and 'path'

- nginx: add endpoint to serve the replay sw.js endpoint
- add defer attr to ui.js
- move 'Download' to 'Download Files'

* frontend: support customizing replayweb.page loading url via RWP_BASE_URL env var in Dockerfile
- default prod value set in frontend Dockerfile (set to upcoming 1.5.8 release needed for multi-wacz-file support) (can be overridden during image build via --build-arg)
- rename index.html -> index.ejs to allow interpolation
- RWP_BASE_URL defaults to latest https://replayweb.page/ for testing
- for local testing, add sw.js loading via devServer, also using RWP_BASE_URL (#131)

Co-authored-by: sua yoo <sua@suayoo.com>
2022-01-31 17:02:15 -08:00
..
archives.py Refactor backend data model to support UUID (fixes #118) (#119) 2022-01-29 19:00:11 -08:00
colls.py Refactor backend data model to support UUID (fixes #118) (#119) 2022-01-29 19:00:11 -08:00
crawlconfigs.py Refactor backend data model to support UUID (fixes #118) (#119) 2022-01-29 19:00:11 -08:00
crawls.py Presign and replay (#127) 2022-01-31 17:02:15 -08:00
db.py Refactor backend data model to support UUID (fixes #118) (#119) 2022-01-29 19:00:11 -08:00
Dockerfile Frontend + Backend Integrated Deployment (K8s only) (#45) 2021-12-03 10:17:22 -08:00
dockerman.py storage: support loading default storage from crawl manangers (#126) 2022-01-31 11:22:03 -08:00
emailsender.py Config superuser (#59) 2021-12-05 14:12:42 -08:00
invites.py Refactor backend data model to support UUID (fixes #118) (#119) 2022-01-29 19:00:11 -08:00
k8sman.py Presign and replay (#127) 2022-01-31 17:02:15 -08:00
main.py Presign and replay (#127) 2022-01-31 17:02:15 -08:00
requirements.txt Presign and replay (#127) 2022-01-31 17:02:15 -08:00
scheduler.py
storages.py storage: support loading default storage from crawl manangers (#126) 2022-01-31 11:22:03 -08:00
users.py Presign and replay (#127) 2022-01-31 17:02:15 -08:00