https://github.com/sachskaylee/plugstaticplus
An extension to the Plug.Static plug to allow for /index file serving
https://github.com/sachskaylee/plugstaticplus
elixir plug
Last synced: 11 months ago
JSON representation
An extension to the Plug.Static plug to allow for /index file serving
- Host: GitHub
- URL: https://github.com/sachskaylee/plugstaticplus
- Owner: SachsKaylee
- License: other
- Created: 2018-01-13T21:58:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-14T00:11:30.000Z (over 8 years ago)
- Last Synced: 2025-07-15T01:55:37.139Z (12 months ago)
- Topics: elixir, plug
- Language: Elixir
- Size: 9.77 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PlugStaticPlus
See the original plug for the full documentation: [plug/static.ex](https://github.com/elixir-plug/plug/blob/master/lib/plug/static.ex)
## Features & Changes
* Support for index handling. Requesting e.g. "/my-dir" while "/my-dir/index.html" exists will serve the "index.html" file. Respects the :custom_types setting if a reroute is performed.
The index files can be specified by using the :index option with either a list of strings or a single string. The default is `["index.html", "index.htm", "index.js", "index.json"]`
* Files can be served from the "/" directory. Will respect index definitions.

## License
Apache License 2.0
Based on parts of [Plug](https://github.com/elixir-plug/plug), which is licensed under the Apache License 2.0