sultaniman / allowed_hosts

Elixir plug to protect your APIs from Host header attacks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Elixir plug to protect your APIs from Host header attacks

License:MIT License


Languages

Language:Elixir 100.0%