-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move MIME-type and charset declaration into their own conf files
- Loading branch information
Showing
3 changed files
with
54 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# ---------------------------------------------------------------------- | ||
# | Character encodings | | ||
# ---------------------------------------------------------------------- | ||
|
||
# Serve all resources labeled as `text/html` or `text/plain` | ||
# with the media type `charset` parameter set to `UTF-8`. | ||
# | ||
# https://nginx.org/en/docs/http/ngx_http_charset_module.html#charset | ||
|
||
charset utf-8; | ||
|
||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
|
||
# Update charset_types to match updated mime.types. | ||
# text/html is always included by charset module. | ||
# Default: text/html text/xml text/plain text/vnd.wap.wml application/javascript application/rss+xml | ||
# | ||
# https://nginx.org/en/docs/http/ngx_http_charset_module.html#charset_types | ||
|
||
charset_types | ||
text/css | ||
text/plain | ||
text/vnd.wap.wml | ||
text/javascript | ||
text/markdown | ||
text/calendar | ||
text/x-component | ||
text/vcard | ||
text/cache-manifest | ||
text/vtt | ||
application/json | ||
application/manifest+json; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# ---------------------------------------------------------------------- | ||
# | Media types | | ||
# ---------------------------------------------------------------------- | ||
|
||
# Serve resources with the proper media types (f.k.a. MIME types). | ||
# | ||
# https://www.iana.org/assignments/media-types/media-types.xhtml | ||
# https://nginx.org/en/docs/http/ngx_http_core_module.html#types | ||
|
||
include mime.types; | ||
|
||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
|
||
# Default: text/plain | ||
# | ||
# https://nginx.org/en/docs/http/ngx_http_core_module.html#default_type | ||
|
||
default_type application/octet-stream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters