More logging.

This commit is contained in:
lain 2018-02-22 14:57:35 +01:00
parent 5dc68d303b
commit 2757682894
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
alias Pleroma.Web.HTTPSignatures
import Plug.Conn
require Logger
def init(options) do
options
@ -11,6 +12,8 @@ def call(%{assigns: %{valid_signature: true}} = conn, opts) do
end
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}"))