Skip to content

Commit

Permalink
feat: add pdf and wasm to compressible mime types (nitrojs#2766)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarvin Roshin authored Oct 1, 2024
1 parent d434900 commit 359af68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/3.config/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ List of compressible MIME types:
- `application/json`
- `application/opentype`
- `application/otf`
- `application/pdf`
- `application/pkcs7-mime`
- `application/protobuf`
- `application/rss+xml`
Expand All @@ -171,6 +172,7 @@ List of compressible MIME types:
- `application/vnd.apple.mpegurl`
- `application/vnd.mapbox-vector-tile`
- `application/vnd.ms-fontobject`
- `application/wasm`
- `application/xhtml+xml`
- `application/xml`
- `application/x-font-opentype`
Expand Down
2 changes: 2 additions & 0 deletions src/core/utils/compress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const COMPRESSIBLE_MIMES_RE = new Set([
"application/json",
"application/opentype",
"application/otf",
"application/pdf",
"application/pkcs7-mime",
"application/protobuf",
"application/rss+xml",
Expand All @@ -98,6 +99,7 @@ const COMPRESSIBLE_MIMES_RE = new Set([
"application/vnd.apple.mpegurl",
"application/vnd.mapbox-vector-tile",
"application/vnd.ms-fontobject",
"application/wasm",
"application/xhtml+xml",
"application/xml",
"application/x-font-opentype",
Expand Down

0 comments on commit 359af68

Please sign in to comment.