View Source TeslaExtra.OptionalPlug (TeslaExtra v0.2.0)

A Tesla plug that wraps another plug, allowing it to be de/activated dynamically.

Options: :plug - the middleware module :opts - a function which returns the options for the plug :active? - a function which takes the request environment and decides whether

  the plug should be run.