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
+3 -3
View File
@@ -1,6 +1,6 @@
# einherjar/spa-server
[![version](https://img.shields.io/badge/version-v1.7.0-5C4EE5?style=flat-square)](https://code.nochebuena.dev/einherjar/spa-server)
[![version](https://img.shields.io/badge/version-v1.7.1-5C4EE5?style=flat-square)](https://code.nochebuena.dev/einherjar/spa-server)
[![license](https://img.shields.io/badge/license-AGPL--3.0-22863A?style=flat-square)](LICENSE)
[![go](https://img.shields.io/badge/Go-1.26+-00ADD8?style=flat-square&logo=go&logoColor=white)](https://go.dev)
@@ -15,7 +15,7 @@ The module ships as a ready-to-use Docker base image. Deploying a SPA to a conta
## Container usage
```dockerfile
FROM code.nochebuena.dev/einherjar/spa-server:v1.7.0
FROM code.nochebuena.dev/einherjar/spa-server:v1.7.1
COPY dist/ /srv/www/
```
@@ -29,7 +29,7 @@ at the root of `dist/`. **Angular**'s application builder instead emits
at the root and every request falls through to a 404:
```dockerfile
FROM code.nochebuena.dev/einherjar/spa-server:v1.7.0
FROM code.nochebuena.dev/einherjar/spa-server:v1.7.1
COPY dist/my-app/browser/ /srv/www/
```