diff options
author | David Stosik <davidstosik@users.noreply.github.com> | 2023-04-03 14:21:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 17:21:13 +1200 |
commit | f5666bc8cb13b8d731ea0222fbd3ada670f2cd55 (patch) | |
tree | 9bc1b6ca72bfd50df091b47d0965c7921b148cb9 | |
parent | b172805895fc0490bf81e942487233e6771f4643 (diff) | |
download | rack-f5666bc8cb13b8d731ea0222fbd3ada670f2cd55.tar.gz |
Update MIME types associated to font extensions `.ttf`, `.woff`, `.woff2`, and `.otf` (#2065)
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | lib/rack/mime.rb | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 871d13fe..7e14ca08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. For info on - Introduce `module Rack::BadRequest` which is included in multipart and query parser errors. ([#2019](https://github.com/rack/rack/pull/2019), [@ioquatix]) - MIME type for JavaScript files (`.js`) changed from `application/javascript` to `text/javascript` ([`1bd0f15`](https://github.com/rack/rack/commit/1bd0f1597d8f4a90d47115f3e156a8ce7870c9c8)) - Add `.mjs` MIME type ([#2057](https://github.com/rack/rack/pull/2057), [@axilleas]) +- Update MIME types associated to `.ttf`, `.woff`, `.woff2` and `.otf` extensions to use mondern `font/*` types. ([#2065](https://github.com/rack/rack/pull/2065), [@davidstosik]) ## [3.0.7] - 2023-03-16 @@ -871,3 +872,4 @@ Items below this line are from the previously maintained HISTORY.md and NEWS.md [@amatsuda]: https://github.com/amatsuda "Akira Matsuda" [@wjordan]: https://github.com/wjordan "Will Jordan" [@BlakeWilliams]: https://github.com/BlakeWilliams "Blake Williams" +[@davidstosik]: https://github.com/davidstosik "David Stosik" diff --git a/lib/rack/mime.rb b/lib/rack/mime.rb index 94d6ed35..0272968f 100644 --- a/lib/rack/mime.rb +++ b/lib/rack/mime.rb @@ -410,7 +410,7 @@ module Rack ".ogx" => "application/ogg", ".org" => "application/vnd.lotus-organizer", ".otc" => "application/vnd.oasis.opendocument.chart-template", - ".otf" => "application/vnd.oasis.opendocument.formula-template", + ".otf" => "font/otf", ".otg" => "application/vnd.oasis.opendocument.graphics-template", ".oth" => "application/vnd.oasis.opendocument.text-web", ".oti" => "application/vnd.oasis.opendocument.image-template", @@ -591,7 +591,7 @@ module Rack ".trm" => "application/x-msterminal", ".ts" => "video/mp2t", ".tsv" => "text/tab-separated-values", - ".ttf" => "application/octet-stream", + ".ttf" => "font/ttf", ".twd" => "application/vnd.simtech-mindmapper", ".txd" => "application/vnd.genomatix.tuxedo", ".txf" => "application/vnd.mobius.txf", @@ -637,8 +637,8 @@ module Rack ".wmv" => "video/x-ms-wmv", ".wmx" => "video/x-ms-wmx", ".wmz" => "application/x-ms-wmz", - ".woff" => "application/font-woff", - ".woff2" => "application/font-woff2", + ".woff" => "font/woff", + ".woff2" => "font/woff2", ".wpd" => "application/vnd.wordperfect", ".wpl" => "application/vnd.ms-wpl", ".wps" => "application/vnd.ms-works", |