Document the auth UI, encrypted-URL routes, q/fit parameters, and the undocumented config keys #75
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Verified against
mainat61f42e6. Covers the "documentation: configuration options / API endpoints" items inTODO.md.README.md:51-60documents exactly one route,/v1/image/....internal/server/routes.go:48-60registers considerably more, none of it documented anywhere:GET /andPOST /— signing-key login form (internal/handlers/auth.go:16-67)GET /logoutPOST /generate— encrypted-URL generatorGET /v1/e/{token}/*— encrypted image URLs (internal/handlers/imageenc.go)GET /robots.txt,GET /.well-known/healthcheck.json,GET /static/*,GET /metricsThe entire encrypted-URL scheme — the
encurl,seal, andsessionpackages, built on CBOR + NaCl secretbox + HKDF — is undocumented. It is a major user-facing feature (an operator-facing web UI for minting time-limited URLs) that a reader of the README would not know exists.Also undocumented:
qandfitquery parameters (internal/handlers/image.go:50-63):qis 1-100,fitis one ofcover|contain|fill|inside|outside(internal/imgcache/imgcache.go:53-60). Both affect the cache key. Note their interaction with signing is a separate security issue.db_urlandenv(internal/config/config.go:119-130,220-223).envis a smartconfig feature providing env-var injection andenv:VARNAMEvalue interpolation — which partly satisfies the "environment variable overrides" item inTODO.md, and nobody can use it because it is written down nowhere.PIXA_CONFIG_PATHand the config search path (config.go:340,352-359):/etc/pixa/config.yml,~/.config/pixa/config.yml,./config.yml, plus.yamlvariants. README mentions only--config.scripts/manual-test.sh, which sits alongside the documentedscript/entrypoints and is not mentioned.Definition of done
qandfitdocumented with their valid ranges and their effect on caching.db_url,env, andPIXA_CONFIG_PATHdocumented, plus the config file search order.config.example.ymllists every key the code accepts, with defaults — makingREADME.md:119's "all options with defaults" claim true. (Coordinate with the issue adding the four missing README keys; whichever lands second completes the set.)scripts/manual-test.shmentioned in the Entrypoints section, or moved/removed.make fmtrun and the formatted markdown committed;make checkgreen.Process note
Docs-only if it stays confined to
README.mdandconfig.example.yml— in which case it skips adversarial review per repo policy. If it turns out a key needs code changes to be documentable, split that into its own issue rather than mixing.