X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb.ex;h=5761e3b385c61d9b7adb5a6d538b4cb2d52e361c;hb=e49b583147748be73062acc92ea510f6f55a503a;hp=397e4d1e72920aa52e9d6ae107d3736a4e3585b2;hpb=2e682788a30b225b67254e92d1807b317ede57f8;p=akkoma diff --git a/lib/pleroma/web.ex b/lib/pleroma/web.ex index 397e4d1e7..5761e3b38 100644 --- a/lib/pleroma/web.ex +++ b/lib/pleroma/web.ex @@ -62,6 +62,14 @@ defmodule Pleroma.Web do ) end + defp skip_auth(conn, _) do + skip_plug(conn, [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug]) + end + + defp skip_public_check(conn, _) do + skip_plug(conn, EnsurePublicOrAuthenticatedPlug) + end + # Executed just before actual controller action, invokes before-action hooks (callbacks) defp action(conn, params) do with %{halted: false} = conn <- @@ -231,8 +239,4 @@ defmodule Pleroma.Web do defmacro __using__(which) when is_atom(which) do apply(__MODULE__, which, []) end - - def base_url do - Pleroma.Web.Endpoint.url() - end end