There was an error while loading. Please reload this page.
1 parent a1a02cd commit 2e97bddCopy full SHA for 2e97bdd
1 file changed
README.md
@@ -173,6 +173,13 @@ This function allows filtering the served files.
173
If the function returns `true`, the file will be served.
174
If the function returns `false`, Fastify's 404 handler will be called.
175
176
+#### `index`
177
+
178
+Default: `undefined`
179
180
+Under the hood we use [send](https://github.com/pillarjs/send#index) lib that by default supports "index.html" files.
181
+To disable this set false or to supply a new index pass a string or an array in preferred order.
182
183
#### `list`
184
185
Default: `undefined`
@@ -187,6 +194,7 @@ Default response is json.
187
194
fastify.register(require('fastify-static'), {
188
195
root: path.join(__dirname, 'public'),
189
196
prefix: '/public/',
197
+ index: false
190
198
list: true
191
199
})
192
200
```
0 commit comments