Possibility for plugins to get the listening host and port #5416
Labels
Component: PeerTube Plugin 📦
Features that can be developed in a plugin, but require PeerTube plugin API development
Type: Feature Request ✨
Describe the problem to be solved
For the livechat plugin, I need to make API Calls from a XMPP server running on the Peertube server, to the Peertube instance.
For now, I use the public Peertube url to make these requests.
But this has 2 drawbacks:
To fix the second point, I added a settings to change the API endpoint url, and you can for example set
http://127.0.0.1:9000
I want to make this simpler, and I'd like to automatically compute this endpoint.
But for now, plugin manager provide no way to get the local host and port (the values
listen.hostname
andlisten.port
in the config file).Describe the solution you would like
I'd like to have listen.host and listen.port somewhere in the helpers provided by Peertube.
For example, by adding it in the result of the backend getServerConfig helper.
Or by adding a new helper here:
PeerTube/server/lib/plugins/plugin-helpers-builder.ts
Lines 206 to 216 in 77239b4
The text was updated successfully, but these errors were encountered: