Skip to content

sultaniman/allowed_hosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.