This repository was archived by the owner on Mar 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,25 @@ defmodule PlugRequireHeader do
22 import Plug.Conn
33 alias Plug.Conn.Status
44
5- @ vsn "0.1.0-dev "
5+ @ vsn "0.1.0"
66 @ doc false
77 def version , do: @ vsn
88
9+ @ doc """
10+ Initialises the plug given a keyword list of the following format.
11+
12+ [<connection_key>: <header_key>]
13+
14+ * The `<connection_key>` atom is the connection key to assign the value of the header.
15+ * The `<header_key>` binary is the header key to be required and extracted.
16+ """
917 def init ( options ) do
1018 options |> List . first
1119 end
1220
21+ @ doc """
22+ Extracts the required headers and assign them to the connection struct.
23+ """
1324 def call ( conn , { connection_key , header_key } ) do
1425 extract_header_key ( conn , connection_key , header_key )
1526 end
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ defmodule PlugRequireHeader.Mixfile do
44 def project do
55 [
66 app: :plug_require_header ,
7- version: "0.1.0-dev " ,
8- name: "GoodTimes " ,
7+ version: "0.1.0" ,
8+ name: "PlugRequireHeader " ,
99 source_url: "https://github.com/DevL/plug_require_header" ,
1010 elixir: "~> 1.0" ,
1111 deps: deps ,
You can’t perform that action at this time.
0 commit comments