mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-21 19:36:04 +00:00
Allow downloading entire site via CLI or HTTP.
The HTTP endpoint is `/.git-pages/archive.tar` and it is gated behind a feature flag `archive-site`. It serially downloads every blob and writes it to the client in a chunked response, optionally compressed with gzip or zstd as per `Accept-Encoding:`. It is authorized the same as `/.git-pages/manifest.json`, for the same reasons. The CLI operation is `-get-archive <site-name>` and it writes a tar archive to stdout. This could be useful for an administrator to review the contents of a site in response to a report. Both `_headers` and `_redirects` files are present in the output, reconstituted from the manifest.
This commit is contained in:
@@ -3,7 +3,7 @@ module codeberg.org/git-pages/git-pages
|
||||
go 1.25.0
|
||||
|
||||
require (
|
||||
codeberg.org/git-pages/go-headers v1.0.0
|
||||
codeberg.org/git-pages/go-headers v1.1.0
|
||||
github.com/KimMachineGun/automemlimit v0.7.5
|
||||
github.com/c2h5oh/datasize v0.0.0-20231215233829-aa82cc1e6500
|
||||
github.com/creasty/defaults v1.8.0
|
||||
|
||||
Reference in New Issue
Block a user