Syntax: | types { ... } |
---|---|
Default: | types {
text/html html;
image/gif gif;
image/jpeg jpg;
} |
Context: | http , server , location |
Maps file name extensions to MIME types of responses. Extensions are case-insensitive. Several extensions can be mapped to one type, for example:
types { application/octet-stream bin exe dll; application/octet-stream deb; application/octet-stream dmg; }
A sufficiently full mapping table is distributed with nginx in the conf/mime.types
file.
To make a particular location emit the “application/octet-stream
” MIME type for all requests, the following configuration can be used:
location /download/ { types { } default_type application/octet-stream; }
Please login to continue.