File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,13 @@ This function allows filtering the served files.
173
173
If the function returns ` true ` , the file will be served.
174
174
If the function returns ` false ` , Fastify's 404 handler will be called.
175
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
+
176
183
#### ` list `
177
184
178
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
```
You can’t perform that action at this time.
0 commit comments