More logging.

This commit is contained in:
lain 2018-02-22 14:57:35 +01:00
parent 5dc68d303b
commit 2757682894

View File

@ -1,6 +1,7 @@
defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
alias Pleroma.Web.HTTPSignatures alias Pleroma.Web.HTTPSignatures
import Plug.Conn import Plug.Conn
require Logger
def init(options) do def init(options) do
options options
@ -11,6 +12,8 @@ defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
end end
def call(conn, opts) do def call(conn, opts) do
user = conn.params["actor"]
Logger.debug("Checking sig for #{user}")
if get_req_header(conn, "signature") do if get_req_header(conn, "signature") do
conn = conn 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}"))