-
Read the request method from
context.methodinstead ofcontext.request.method, so it's compatible with themethod-overridemiddleware -
Add
@remix-run/fsas a peer dependency. This package now imports from@remix-run/fsinstead of@remix-run/lazy-file/fs. -
Add
indexoption to configure which files to serve when a directory is requested. When a request targets a directory, the middleware will try each index file in order until one is found. Defaults to['index.html', 'index.htm']. Supports boolean shortcuts:truefor defaults,falseto disable.// Serve index.html from directories by default staticFiles('./public') // Custom index files staticFiles('./public', { index: ['default.html', 'home.html'], }) // Disable index file serving staticFiles('./public', { index: false }) staticFiles('./public', { index: [] })