X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fendpoint.ex;h=4a235fdd7f66583ed9e212c2a15ee7094da9cce0;hb=37ae047e1652c4089934434ec79f393c4c839122;hp=75484fac5ee768c401082a4f9ab5e3183ab3a589;hpb=73609211a425922a5068d3912a36b82abe24e12c;p=akkoma diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index 75484fac5..4a235fdd7 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -12,8 +12,6 @@ defmodule Pleroma.Web.Endpoint do socket("/socket", Pleroma.Web.UserSocket) socket("/live", Phoenix.LiveView.Socket) - plug(Plug.Telemetry, event_prefix: [:phoenix, :endpoint]) - plug(Pleroma.Web.Plugs.SetLocalePlug) plug(CORSPlug) plug(Pleroma.Web.Plugs.HTTPSecurityPlug) @@ -68,6 +66,29 @@ defmodule Pleroma.Web.Endpoint do } ) + plug(Plug.Static.IndexHtml, at: "/akkoma/swaggerui") + + plug(Pleroma.Web.Plugs.FrontendStatic, + at: "/akkoma/swaggerui", + frontend_type: :swagger, + gzip: true, + if: &Akkoma.Web.Swagger.ui_enabled?/0, + cache_control_for_etags: @static_cache_control, + headers: %{ + "cache-control" => @static_cache_control + } + ) + + plug(Pleroma.Web.Plugs.FrontendStatic, + at: "/", + frontend_type: :mastodon, + gzip: true, + cache_control_for_etags: @static_cache_control, + headers: %{ + "cache-control" => @static_cache_control + } + ) + # Serve at "/" the static files from "priv/static" directory. # # You should set gzip to true if you are running phoenix.digest