Skip to content
🔓 Allows registration of every Plug with dynamic configuration.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.formatter.exs
.gitignore
.travis.yml
LICENSE
README.md
mix.exs

README.md

Plug Dynamic

GitHub license Build Status Hex.pm Version

Coverage Status

Allows registration of every Plug with dynamic configuration.

Installation

The package can be installed by adding plug_dynamic to your list of dependencies in mix.exs:

def deps do
  [
    {:plug_dynamic, "~> 1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. The docs can be found at https://hexdocs.pm/plug_dynamic.

Usage Example

For detailed instructions check the documentation.

defmodule Acme.Endpoint do
  use Plug.Builder
  use PlugDynamic

  dynamic_plug Plug.IpWhitelist.IpWhitelistEnforcer, [reevaluate: :first_usage] do
    Application.fetch_env!(:acme, Plug.IpWhitelist.IpWhitelistEnforcer)
  end
end
You can’t perform that action at this time.