Add remote_ip plug

This commit is contained in:
minibikini 2019-09-27 21:59:23 +00:00 committed by Haelwenn
commit f9380289eb
10 changed files with 187 additions and 4 deletions

View file

@ -97,10 +97,7 @@ defmodule Pleroma.Web.Endpoint do
extra: extra
)
# Note: the plug and its configuration is compile-time this can't be upstreamed yet
if proxies = Pleroma.Config.get([__MODULE__, :reverse_proxies]) do
plug(RemoteIp, proxies: proxies)
end
plug(Pleroma.Plugs.RemoteIp)
defmodule Instrumenter do
use Prometheus.PhoenixInstrumenter