This Elixir plug protects your resources and APIs from Host header attack.
To use the plug in your projects, edit your mix.exs file and add the project as a dependency:
defp deps do
[
{:allowed_hosts, "~> 0.1.0"}
]
end
pipeline :browser do
plug AllowedHosts, ["example.com", "example2.com"]
end
- Add more tests.