Fix signing bug.

This commit is contained in:
lain 2018-02-25 20:15:04 +01:00
parent f61fd00db5
commit 5ea6d96dbe

View File

@ -16,7 +16,7 @@ def call(conn, opts) do
Logger.debug("Checking sig for #{user}")
if get_req_header(conn, "signature") do
conn = conn
|> put_req_header("(request-target)", String.downcase("#{conn.method} #{conn.request_path}"))
|> put_req_header("(request-target)", String.downcase("#{conn.method}") <> " #{conn.request_path}")
assign(conn, :valid_signature, HTTPSignatures.validate_conn(conn))
else