Serve the format auto, chosen from the Accept header (closes #88)
check / check (push) Failing after 2s
check / check (push) Failing after 2s
auto is a format in the /v1/image/ path, an encrypted URL's token and the generator page. Once the signature or token is checked, pixa chooses AVIF when Accept names image/avif, else WebP when it names image/webp, else JPEG when the most specific of image/jpeg, image/* and */* allows it or Accept is absent. q=0 refuses a format; a header allowing none of the three answers 406, one that does not parse 400. The signature and token cover auto itself; the cache key and ETag use the chosen format. Answers from then on carry Vary: Accept. Model: opus-5-5
This commit is contained in:
@@ -30,6 +30,17 @@ P2: security: per-IP rate limiting on the image routes
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-05 the format `auto` (closes #88): a format in the `/v1/image/` path,
|
||||
an encrypted URL's token and the generator page's format choice, chosen for
|
||||
each request from `Accept` once the signature or token is checked: AVIF when
|
||||
the header names `image/avif`, else WebP when it names `image/webp`, else JPEG
|
||||
when the first of `image/jpeg`, `image/*` and `*/*` that it names allows it,
|
||||
or when it names nothing; `q=0` refuses a format. AVIF and WebP must be named,
|
||||
as clients that cannot show them send the wildcards too. A header that allows
|
||||
none of the three answers 406, one that does not parse 400. The signature and
|
||||
the token cover `auto` itself; the cache key and `ETag` use the format chosen.
|
||||
Answers from the point the format is chosen carry `Vary: Accept`, next to the
|
||||
CORS `Vary: Origin`; fixed-format answers do not.
|
||||
- 2026-10-05 the markdown is formatted with prettier (closes #100): `script/fmt`
|
||||
and `script/fmt-check` run prettier 3.8.1, pinned in `package.json` and
|
||||
`yarn.lock`, on `**/*.md` after `gofmt`, with four-space tabs and
|
||||
@@ -661,8 +672,6 @@ P2: security: per-IP rate limiting on the image routes
|
||||
- per-origin rate limiting
|
||||
- P2: HTTP response handling
|
||||
- Last-Modified headers
|
||||
- Vary header for content negotiation
|
||||
- P2: auto format selection (format=auto based on Accept header)
|
||||
- P2: configuration
|
||||
- YAML config file support
|
||||
- P2: operational
|
||||
|
||||
Reference in New Issue
Block a user