Add WebSocket path config for community MQTT

Path hardcoded to "/". Brokers like analyzer.montrealmesh.ca need
non-root path (e.g. /mqtt). Expose field in fanout config + UI.
This commit is contained in:
Martin Fournier
2026-05-11 02:11:55 -04:00
parent 70cb133b24
commit 25190cded5
4 changed files with 41 additions and 1 deletions
@@ -1548,6 +1548,24 @@ function MqttCommunityConfigEditor({
</div>
</div>
{((config.transport as string) || DEFAULT_COMMUNITY_TRANSPORT) === 'websockets' && (
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div className="space-y-2">
<Label htmlFor="fanout-comm-ws-path">WebSocket Path</Label>
<Input
id="fanout-comm-ws-path"
type="text"
placeholder="/"
value={(config.websocket_path as string | undefined) ?? ''}
onChange={(e) => onChange({ ...config, websocket_path: e.target.value })}
/>
<p className="text-[0.8125rem] text-muted-foreground">
Defaults to <code>/</code> use <code>/mqtt</code> for brokers that require a path
</p>
</div>
</div>
)}
<p className="text-[0.8125rem] text-muted-foreground">
LetsMesh uses <code>token</code> auth. MeshRank uses <code>none</code>.
</p>