diff options
author | rinpatch <rinpatch@sdf.org> | 2019-03-21 17:08:40 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-03-21 17:08:40 +0000 |
commit | b48fddef5f0528e9b45d7277588108c0bf777349 (patch) | |
tree | 20374c28dba8a8dee3bff211fb5f8907be9951cf | |
parent | b92a16aa006dd7ec26397b6fcd111c8f8f843a9c (diff) | |
parent | 80bc9ed2ba9aa86edf8c1756c9ee59ad2a9bf20b (diff) | |
download | pleroma-b48fddef5f0528e9b45d7277588108c0bf777349.tar.gz |
Merge branch 'feature/gopher-dstport' into 'develop'
Add a gopher url port config option
See merge request pleroma/pleroma!959
-rw-r--r-- | docs/config.md | 1 | ||||
-rw-r--r-- | lib/pleroma/gopher/server.ex | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/config.md b/docs/config.md index 201180373..4fa6bd62d 100644 --- a/docs/config.md +++ b/docs/config.md @@ -190,6 +190,7 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * `enabled`: Enables the gopher interface * `ip`: IP address to bind to * `port`: Port to bind to +* `dstport`: Port advertised in urls (optional, defaults to `port`) ## :activitypub * ``accept_blocks``: Whether to accept incoming block activities from other instances diff --git a/lib/pleroma/gopher/server.ex b/lib/pleroma/gopher/server.ex index 6baacc566..3b9629d77 100644 --- a/lib/pleroma/gopher/server.ex +++ b/lib/pleroma/gopher/server.ex @@ -66,7 +66,8 @@ defmodule Pleroma.Gopher.Server.ProtocolHandler do def link(name, selector, type \\ 1) do address = Pleroma.Web.Endpoint.host() port = Pleroma.Config.get([:gopher, :port], 1234) - "#{type}#{name}\t#{selector}\t#{address}\t#{port}\r\n" + dstport = Pleroma.Config.get([:gopher, :dstport], port) + "#{type}#{name}\t#{selector}\t#{address}\t#{dstport}\r\n" end def render_activities(activities) do |