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:
@@ -1,6 +1,6 @@
|
||||
# einherjar/spa-server
|
||||
|
||||
[](https://code.nochebuena.dev/einherjar/spa-server)
|
||||
[](https://code.nochebuena.dev/einherjar/spa-server)
|
||||
[](LICENSE)
|
||||
[](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/
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user