diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-09-27 21:59:23 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-09-27 21:59:23 +0000 |
commit | 705ea1b975779180c15d7b32d22f7fb9a11b2ed9 (patch) | |
tree | 5bb67874c8b34ad13f25055938826475f38e2301 /config/description.exs | |
parent | 92d08d4113c4de09cd8d736ed1a0349745866eef (diff) | |
parent | f9380289eb251c818e87e8f0ad0a41fc8bdd90aa (diff) | |
download | pleroma-705ea1b975779180c15d7b32d22f7fb9a11b2ed9.tar.gz pleroma-705ea1b975779180c15d7b32d22f7fb9a11b2ed9.zip |
Merge branch 'remote-ip' into 'develop'
Add `remote_ip` plug
See merge request pleroma/pleroma!1608
Diffstat (limited to 'config/description.exs')
-rw-r--r-- | config/description.exs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/config/description.exs b/config/description.exs index 38b30bbf6..4547ea368 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2689,6 +2689,42 @@ config :pleroma, :config_description, [ }, %{ group: :pleroma, + key: Pleroma.Plugs.RemoteIp, + type: :group, + description: """ + **If your instance is not behind at least one reverse proxy, you should not enable this plug.** + + `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration. + """, + children: [ + %{ + key: :enabled, + type: :boolean, + description: "Enable/disable the plug. Defaults to `false`.", + suggestions: [true, false] + }, + %{ + key: :headers, + type: {:list, :string}, + description: + "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Defaults to `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`." + }, + %{ + key: :proxies, + type: {:list, :string}, + description: + "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Defaults to `[]`." + }, + %{ + key: :reserved, + type: {:list, :string}, + description: + "Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network)." + } + ] + }, + %{ + group: :pleroma, key: :web_cache_ttl, type: :group, description: |