fix(mime): register application/manifest+json for .webmanifest (+ webp/avif); v1.7.1

Go's MIME table has no .webmanifest entry, so http.FileServer sniffed the PWA web
app manifest as text/plain. mime.AddExtensionType at package load makes TypeByExtension
authoritative. A correctness nit (the manifest spec parses by content and nosniff does
not reject manifests), but a PWA server should label its manifest correctly.
This commit is contained in:
2026-08-18 18:43:55 -06:00
parent b73b9ee022
commit d6665047d8
6 changed files with 62 additions and 13 deletions
+11
View File
@@ -6,6 +6,17 @@ This module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html
---
## [1.7.1] — 2026-08-14
Patch — correct MIME types for PWA assets.
### Fixed
- Register `application/manifest+json` for `.webmanifest` (plus `image/webp` and `image/avif`) at
startup. Without it, Go's content sniffing served the PWA web app manifest as `text/plain`.
Nothing broke in practice — the manifest spec parses by content, and `nosniff` does not reject
manifests — but a PWA-focused server should label its manifest correctly.
## [1.7.0] — 2026-08-14
Minor — HTTP behaviour: caching, a strict SPA fallback, security headers, and a non-root image.