From 4f87b8362b44cf1b628248dbf38eabf670575ca2 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 10 Nov 2018 11:23:50 +0000 Subject: [PATCH] endpoint: move CORSPlug in front of Plug.Static --- lib/pleroma/web/endpoint.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 """