From: William Pitcock Date: Sat, 10 Nov 2018 11:23:50 +0000 (+0000) Subject: endpoint: move CORSPlug in front of Plug.Static X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=4f87b8362b44cf1b628248dbf38eabf670575ca2;p=akkoma endpoint: move CORSPlug in front of Plug.Static --- diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index 2469d7283..cb5de087b 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -11,6 +11,8 @@ defmodule Pleroma.Web.Endpoint do # # You should set gzip to true if you are running phoenix.digest # when deploying your static files in production. + plug(CORSPlug) + plug(Plug.Static, at: "/media", from: Pleroma.Uploaders.Local.upload_path(), gzip: false) plug( @@ -57,7 +59,6 @@ defmodule Pleroma.Web.Endpoint do extra: "SameSite=Strict" ) - plug(CORSPlug) plug(Pleroma.Web.Router) @doc """