Reduce scope of user_type
.gitignore: add pagessrht-daily
server.go: update core-go usage
Convert user_type to pg enum
Makefile: add target for pagessrht-daily
Fix build
This seems to have been an oversight in 2c81652.
Make cleanup script a daily cron job
The only sensitive way to clean up old pages (given the current
architecture) is currently to schedule a bucket policy. The bucket
policy evaluation happens at a low level API and will delete even huge
amounts of data with little impact on performance.
The program will find the first 1000 obsolete site versions and schedule
a policy with rules to remove those. This is far from perfect, and but a
decent solution for now, and the learning from trying to implement the
cleanup in various ways will be reflected in future updates to the pages
& storage architecture.
Use slice to store CSP entries
No change in behavior.
server.go: add allow-downloads directive to CSP
contrib/cleanup: fix wait in wrong place
contrib/cleanup: use lifecycle for efficiency
Deleting individual objects is painfully slow. Instead, use a lifecycle
policy rule to expire a given prefix. The actual deleting will then be
done by internal mechanisms, which are vastly more efficient.
contrib: add tool to purge old sites from storage
server.go: add data: to img-src CSP