]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
daemon: allow per-listener servername= and serverport=
authorEric Wong <e@80x24.org>
Fri, 28 Mar 2025 10:34:10 +0000 (10:34 +0000)
committerEric Wong <e@80x24.org>
Sun, 30 Mar 2025 18:19:36 +0000 (18:19 +0000)
commit243288259c8a52b14064052c3a08960854aad75d
tree334962da62069c2b9cce519046c2e187272f1c90
parent1b130400c05d3aad532cf1a397468a8a5ebf93a7
daemon: allow per-listener servername= and serverport=

Being able to specify per-listener servername= with the
`--listen' CLI arg is helpful for running an Tor .onion NNTP
server with the same config file (and thus
publicinbox.nntpserver) as a public-facing NNTP endpoint.

For HTTP, servername= and serverport= allow overriding the
SERVER_NAME and SERVER_PORT PSGI environment variables,
respectively.  These are useful for generating full URLs
for clients which don't send the HTTP `Host:' header.

These currently have no effect aside from wasting memory for
POP3 and IMAP listeners.  serverport= isn't used by NNTP,
either.
Documentation/public-inbox-config.pod
Documentation/public-inbox-daemon.pod
Documentation/public-inbox-netd.pod
lib/PublicInbox/Daemon.pm
lib/PublicInbox/HTTPD.pm
lib/PublicInbox/NNTPD.pm
t/httpd.t
t/nntpd.t