forked from AkkomaGang/akkoma
More logging.
This commit is contained in:
parent
5dc68d303b
commit
2757682894
1 changed files with 3 additions and 0 deletions
|
@ -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 @@ def call(%{assigns: %{valid_signature: true}} = conn, opts) 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}"))
|
||||||
|
|
Loading…
Reference in a new issue