diff options
author | rinpatch <rinpatch@sdf.org> | 2020-02-07 19:21:55 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-02-07 20:14:06 +0300 |
commit | 15ea75cd2aa649a3d2db2ccd569e679c2433b6cb (patch) | |
tree | 52c4af15b2e4cab90587b79bf520d66954c060ad /lib/pleroma/web/endpoint.ex | |
parent | f57cea17bca012569f71d1498fa6e6fa230b4ce0 (diff) | |
download | pleroma-15ea75cd2aa649a3d2db2ccd569e679c2433b6cb.tar.gz |
Actually fix upload limit on OTP releases
Closes #1109
Diffstat (limited to 'lib/pleroma/web/endpoint.ex')
-rw-r--r-- | lib/pleroma/web/endpoint.ex | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index d32c38a05..a77b73109 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -61,7 +61,17 @@ defmodule Pleroma.Web.Endpoint do plug(Plug.RequestId) plug(Plug.Logger, log: :debug) - plug(Pleroma.Plugs.Parsers) + plug(Plug.Parsers, + parsers: [ + :urlencoded, + {:multipart, length: {Pleroma.Config, :get, [[:instance, :upload_limit]]}}, + :json + ], + pass: ["*/*"], + json_decoder: Jason, + length: Pleroma.Config.get([:instance, :upload_limit]), + body_reader: {Pleroma.Web.Plugs.DigestPlug, :read_body, []} + ) plug(Plug.MethodOverride) plug(Plug.Head) |