Skip to content

Commit a4eda2f

Browse files
kjendrzycahaoxin
authored and
haoxin
committedAug 7, 2017
Add info about index option to the readme (#88)
1 parent 4409001 commit a4eda2f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎Readme.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ $ npm install koa-send
1919
## Options
2020

2121
- `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`)
2323
- `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/`.
2829
- [`setHeaders`](#setheaders) Function to set custom headers on response.
2930
- `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`)
3031

0 commit comments

Comments
 (0)
Please sign in to comment.