You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Readme.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,13 @@ $ npm install koa-send
19
19
## Options
20
20
21
21
-`maxage` Browser cache max-age in milliseconds. (defaults to `0`)
22
-
-`immutable` Tell the browser the resource is immutable and can be cached indefinitely (defaults to `false`)
22
+
-`immutable` Tell the browser the resource is immutable and can be cached indefinitely. (defaults to `false`)
23
23
-`hidden` Allow transfer of hidden files. (defaults to `false`)
24
-
-[`root`](#root-path) Root directory to restrict file access
25
-
-`gzip` Try to serve the gzipped version of a file automatically when `gzip` is supported by a client and if the requested file with `.gz` extension exists. defaults to true.
26
-
-`brotli` Try to serve the brotli version of a file automatically when `brotli` is supported by a client and if the requested file with `.br` extension exists. defaults to true.
27
-
-`format` If not `false` (defaults to `true`), format the path to serve static file servers and not require a trailing slash for directories, so that you can do both `/directory` and `/directory/`
24
+
-[`root`](#root-path) Root directory to restrict file access.
25
+
-`index` Name of the index file to serve automatically when visiting the root location. (defaults to none)
26
+
-`gzip` Try to serve the gzipped version of a file automatically when `gzip` is supported by a client and if the requested file with `.gz` extension exists. (defaults to `true`).
27
+
-`brotli` Try to serve the brotli version of a file automatically when `brotli` is supported by a client and if the requested file with `.br` extension exists. (defaults to `true`).
28
+
-`format` If not `false` (defaults to `true`), format the path to serve static file servers and not require a trailing slash for directories, so that you can do both `/directory` and `/directory/`.
28
29
-[`setHeaders`](#setheaders) Function to set custom headers on response.
29
30
-`extensions` Try to match extensions from passed array to search for file when no extension is sufficed in URL. First found is served. (defaults to `false`)
0 commit comments