1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Plugs.TrailingFormatPlug do
6 @moduledoc "Calls TrailingFormatPlug for specific paths. Ideally we would just do this in the router, but TrailingFormatPlug needs to be called before Plug.Parsers."
25 "/api/externalprofile",
32 TrailingFormatPlug.init(opts)
36 def call(%{request_path: unquote(path) <> _} = conn, opts) do
37 TrailingFormatPlug.call(conn, opts)
41 def call(conn, _opts), do: conn