mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 11:19:19 +00:00
16 lines
426 B
Elixir
16 lines
426 B
Elixir
# Pleroma: A lightweight social networking server
|
|
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
defmodule Pleroma.Web.Plugs.SetRequesterReachablePlug do
|
|
import Plug.Conn
|
|
|
|
def init(_), do: []
|
|
|
|
def call(%Plug.Conn{} = conn, _) do
|
|
with [referer] <- get_req_header(conn, "referer"),
|
|
do: Pleroma.Instances.set_reachable(referer)
|
|
|
|
conn
|
|
end
|
|
end
|