aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2019-03-18 15:47:58 +0100
committerrinpatch <rinpatch@sdf.org>2019-03-21 19:59:43 +0300
commit80bc9ed2ba9aa86edf8c1756c9ee59ad2a9bf20b (patch)
tree20374c28dba8a8dee3bff211fb5f8907be9951cf /lib
parentb92a16aa006dd7ec26397b6fcd111c8f8f843a9c (diff)
downloadpleroma-80bc9ed2ba9aa86edf8c1756c9ee59ad2a9bf20b.tar.gz
Add a gopher url port config option
This lets the user advertise a different port in the gopher urls, for example listening locally on port 7070 but telling clients to connect to the regular port 70.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/gopher/server.ex3
1 files changed, 2 insertions, 1 deletions
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