endpoint: move CORSPlug in front of Plug.Static
authorWilliam Pitcock <nenolod@dereferenced.org>
Sat, 10 Nov 2018 11:23:50 +0000 (11:23 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sat, 10 Nov 2018 11:23:50 +0000 (11:23 +0000)
lib/pleroma/web/endpoint.ex

index 2469d7283af7ba55b37019b10ca96be933bb2665..cb5de087b4333a5f7f785a3c39d8ba7430ac5025 100644 (file)
@@ -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 """