- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (0)
- 4.1.8 (0)
- 4.2.1 (38)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (0)
- 5.1.7 (0)
- 5.2.3 (1)
- 6.0.0 (0)
- 6.1.3.1 (-1)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (3)
- 7.1.3.4 (0)
- What's this?
This middleware returns a file’s contents from disk in the body response. When initialized, it can accept optional HTTP headers, which will be set when a response containing a file’s contents is delivered.
This middleware will render the file specified in `env[“PATH_INFO”]` where the base path is in the root directory. For example, if the root is set to `public/`, then a request with `env[“PATH_INFO”]` of `assets/application.js` will return a response with the contents of a file located at `public/assets/application.js` if the file exists. If the file does not exist, a 404 “File not Found” response will be returned.