Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

KineticCafe/ip_access_control

Repository files navigation

IP Access Control Plug

IpAccessControl is a Plug restricts requests so that they must come from the range of IP addresses specified in the pipeline configuration. This assumes that the IP is present in the remote_ip attribute on the passed-in Plug.Conn.

If the request IP is not allowed, the specified response code and body will be added to the Plug.Conn and the chain will be halted. Otherwise, the plug chain will continue.

Documentation can be found at https://hexdocs.pm/ip_access_control.

Installation

Add ip_access_control to your list of dependencies in mix.exs. If your application is running behind a proxy, you should to also include and use remote_ip as an explicit dependency and configure that as well.

def deps do
[
{:ip_access_control, "~> 1.1.0"},
{:remote_ip, "~> 1.0"} # Required if behind a proxy
]
end

IpAccessControl documentation is found on HexDocs.

Semantic Versioning

IpAccessControl follows Semantic Versioning 2.0.

About

Elixir Plug to control access by IP address

Topics

Resources

Readme

License

View license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy

Stars

Watchers

Forks

Packages

Contributors

Languages