This is the changelog for static-middleware. It follows semantic versioning.
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
-
Prevent
staticFiles()from serving files outside its configured root through symlinks. -
Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Bumped
@remix-run/*dependencies:
- Changed
@remix-run/*peer dependencies to regular dependencies
- Update
@remix-run/fspeer dependency to use newopenLazyFile()API
-
BREAKING CHANGE: Replace
mrmimedependency with@remix-run/mimefor MIME type detection which is now a peer dependency. -
Add support for
acceptRangesfunction to conditionally enable HTTP Range requests based on the file being served:// Enable ranges only for large files staticFiles('./public', { acceptRanges: (file) => file.size > 10 * 1024 * 1024, }) // Enable ranges only for videos staticFiles('./public', { acceptRanges: (file) => file.type.startsWith('video/'), })
-
BREAKING CHANGE: Now uses
@remix-run/responsefor file and HTML responses instead of@remix-run/fetch-router/response-helpers. The@remix-run/responsepackage is now a peer dependency. -
Add
listFilesoption to generate a directory listing when a directory is requested.staticFiles('./public', { listFiles: true })
-
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: [] })
Initial release extracted from @remix-run/fetch-router v0.9.0.
See the README for more details.