Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Latest commit

 

History

History
32 lines (23 loc) · 781 Bytes

File metadata and controls

32 lines (23 loc) · 781 Bytes

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.