Skip to content

Commit

Permalink
make authorisation request work in Elixir #1 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jul 21, 2020
1 parent 6d584bf commit 91e3d98
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule TodoExampleWeb.TodoController do
end

def admin(conn, _params) do
token = get_req_header(conn, "Authorization")
token = List.first(get_req_header(conn, "authorization"))

case token do
"Bearer hunter2" -> text(conn, "Authorized!")
Expand Down

0 comments on commit 91e3d98

Please sign in to comment.