https://github.com/sultaniman/allowed_hosts
Elixir plug to protect your APIs from Host header attacks
https://github.com/sultaniman/allowed_hosts
allowedhosts elixir header-attack plug security
Last synced: 13 days ago
JSON representation
Elixir plug to protect your APIs from Host header attacks
- Host: GitHub
- URL: https://github.com/sultaniman/allowed_hosts
- Owner: sultaniman
- License: mit
- Created: 2016-12-04T17:58:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-02-05T12:33:55.000Z (over 6 years ago)
- Last Synced: 2025-12-13T02:12:12.149Z (6 months ago)
- Topics: allowedhosts, elixir, header-attack, plug, security
- Language: Elixir
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# AllowedHosts
This [Elixir](http://elixir-lang.org/) [plug](https://github.com/elixir-lang/plug) protects your resources and APIs from [Host header attack](https://www.acunetix.com/vulnerabilities/web/host-header-attack).
## Installation
To use the plug in your projects, edit your mix.exs file and add the project as a dependency:
```elixir
defp deps do
[
{:allowed_hosts, "~> 0.1.0"}
]
end
```
## Usage
```elixir
pipeline :browser do
plug AllowedHosts, ["example.com", "example2.com"]
end
```
## TODO
* Add more tests.