More signature debugging.
This commit is contained in:
parent
b0d242cd92
commit
f29902a241
4 changed files with 72 additions and 27 deletions
|
|
@ -14,9 +14,14 @@ defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
|
|||
def call(conn, opts) do
|
||||
user = conn.params["actor"]
|
||||
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}")
|
||||
conn =
|
||||
conn
|
||||
|> put_req_header(
|
||||
"(request-target)",
|
||||
String.downcase("#{conn.method}") <> " #{conn.request_path}"
|
||||
)
|
||||
|
||||
assign(conn, :valid_signature, HTTPSignatures.validate_conn(conn))
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue