RequestTimePlug

Request Time plug

Plug to get constant response time for requests. Simple protection against side channel attacks.

Installation

If available in Hex, the package can be installed by adding request_time_plug to your list of dependencies in mix.exs:

def deps do
  [
    {:request_time_plug, "~> 0.1.0"}
  ]
end
  defmodule MyAppWeb.Router do
    ...

    plug RequestTimePlug, request_time: 2000

    post "/pake_password_hash", Foo
  end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/request_time_plug.