1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-22 16:03:25 +00:00
mobilizon/lib/web/plug_configs.ex
Thomas Citharel c080795955
Reconfigure plug at runtime with env
Closes #1165

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-10-06 08:59:50 +02:00

14 lines
343 B
Elixir

defmodule Mobilizon.Web.PlugConfigs do
@moduledoc """
Runtime configuration for plugs
"""
def parsers do
upload_limit =
Keyword.get(Application.get_env(:mobilizon, :instance, []), :upload_limit, 10_485_760)
[
parsers: [:urlencoded, {:multipart, length: upload_limit}, :json, Absinthe.Plug.Parser]
]
end
end