Every pyramid level is cut into at least min_grid x min_grid tiles. Each photo's tile pool mixes real tiles with hard-linked decoys from other photos; the grid-to-pool map, byte sizes, seed and scramble seed are sealed per build and unlocked by a press-and-hold check backed by a static proof of work. Cell scrambling is on by default, and robots.txt disallows tiles and pool files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1.2 KiB
1.2 KiB
Cloudflare
Run the site behind a Cloudflare Tunnel (cloudflared.yml in this folder). In serve mode the tunnel points at LuPhoto on 127.0.0.1:8080. In export mode it points at Caddy or nginx; give that web server a plain HTTP listener on 127.0.0.1:8080 for the tunnel, for example http://photos.luciochen.com:8080 in the Caddyfile, or listen 127.0.0.1:8080; in nginx.
Cache rules (Caching → Cache Rules), in this order:
- Tiles, OG images and assets: when the URI path starts with
/t/,/og/or/assets/, set Eligible for cache, Edge TTL 1 month (or "use cache-control header"), Browser TTL "respect origin". Their names are content-hashed, so they never change. - Everything else (HTML,
/a/*including the per-photo pool files under/a/<slug>/p/,index.<build>.json,robots.txt): Edge TTL 1 minute or "respect origin" (max-age=60). Manifests and pool files are named after the build, so a new build needs no purge. Decoy tiles under/t/never change their bytes either, so rule 1 holds for them.
Keep "Cache by device type" and query-string variations off. Hotlink protection is done by LuPhoto, Caddy or nginx on /t/*; Cloudflare's own Hotlink Protection can stay off, or be enabled for the same hostname.