allowed_hosts

Elixir plug to protect your APIs from Host header attacks.


Keywords
allowedhosts, elixir, header-attack, plug, security
License
MIT

Documentation

AllowedHosts

This Elixir plug protects your resources and APIs from Host header attack.

Installation

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

Usage

pipeline :browser do
  plug AllowedHosts, ["example.com", "example2.com"]
end

TODO

  • Add more tests.