prometheus/service
Local Dev bbef07c825 prometheus: 200 MiB upload cap + Caddy block fix for the "<" error
Two bugs under one roof.

The visible one: a publisher uploading anything over 10 MB on the live
site got "Network error — Unexpected token '<'" in the browser console.
Cause: the Caddy block I wrote for prometheus.x had
`request_body { max_size 2GB }` nested inside the handle block, where it
is a syntax Caddy parses but does not apply, so Caddy's own 10 MB
default was still the gate. Any oversize POST got Caddy's HTML 413 page,
which the browser's JSON parser choked on at the leading `<`.

Fix: moved `request_body { max_size … }` to the top of the prometheus.x
site block (outside `handle`), where Caddy actually honours it. The live
Caddyfile on p2pexchange is already patched + reloaded; a 50 MB upload
verified through the end-to-end path (Caddy → service → clamd → signed
scan report).

The scope one: 2 GiB was more than Prometheus should offer to publishers
at launch. Mobile apps are usually ~100 MB and even most desktop
installers come in well under 200 MiB. Dropping to 200 MiB:

  - Fits every Android APK and most desktop installers.
  - Shrinks the operator's Sia storage bill (fewer accidental Steam-size
    uploads).
  - Keeps the "publishers of larger binaries self-host and submit a
    manifest with the external URL + SHA" escape hatch — the scanner
    still fetches the URL and checks the hash, so a 5 GB game isn't
    locked out, Prometheus just doesn't eat its storage.

Changes:
  service/uploads.js       MAX_FILE_BYTES default: 2 GiB → 200 MiB
  service/pages.js         /submit step-1 subtitle: "any size up to
                           2 GiB" → "up to 200 MiB"
  deploy/prometheus-x.conf (unused angie fallback) 2g → 200m
  deploy/apps-silentmode-st.conf (unused angie fallback) 2g → 200m

PROMETHEUS_MAX_UPLOAD_BYTES env still overrides per-instance.
2026-10-22 23:20:19 +03:00
..
lib prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
admin-pages.js prometheus: BCH payments — invoices, price oracle, admin reconcile 2026-10-08 21:52:01 +02:00
admin-session.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
admin.js prometheus: BCH payments — invoices, price oracle, admin reconcile 2026-10-08 21:52:01 +02:00
audit.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
bns.js prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
clamd.js prometheus: VirusTotal enrichment, gated on VIRUSTOTAL_API_KEY 2026-10-08 21:44:34 +02:00
db.js prometheus: BCH payments — invoices, price oracle, admin reconcile 2026-10-08 21:52:01 +02:00
invoice-api.js prometheus: BCH payments — invoices, price oracle, admin reconcile 2026-10-08 21:52:01 +02:00
layout.js prometheus: standalone identity + first-wave Silent Mode listings 2026-10-09 01:23:21 +02:00
listings.js prometheus: taxonomy — Apps / Games / FinTech, with sub-chips inside Apps 2026-10-22 22:39:08 +03:00
modes.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
pages-browse.js prometheus: SEO terms in the Browsers & web tools blurb 2026-10-22 22:50:24 +03:00
pages.js prometheus: 200 MiB upload cap + Caddy block fix for the "<" error 2026-10-22 23:20:19 +03:00
payments.js prometheus: BCH payments — invoices, price oracle, admin reconcile 2026-10-08 21:52:01 +02:00
price.js prometheus: BCH payments — invoices, price oracle, admin reconcile 2026-10-08 21:52:01 +02:00
seo.js prometheus: weekly s3 snapshot of the browse surface to bns/prometheus 2026-10-08 21:42:54 +02:00
server.js prometheus: taxonomy — Apps / Games / FinTech, with sub-chips inside Apps 2026-10-22 22:39:08 +03:00
signing.js prometheus: upload + ClamAV scan + signed scan reports 2026-10-05 22:41:55 +02:00
uploads.js prometheus: 200 MiB upload cap + Caddy block fix for the "<" error 2026-10-22 23:20:19 +03:00
virustotal.js prometheus: VirusTotal enrichment, gated on VIRUSTOTAL_API_KEY 2026-10-08 21:44:34 +02:00