include OpenWebRX ticket in issued session URLs

This commit is contained in:
2026-04-02 23:15:15 +02:00
parent 25bd51c0db
commit 3ca8db4231
3 changed files with 26 additions and 5 deletions

View File

@@ -58,10 +58,12 @@ function issueAccess(ctx, tickets, input) {
expiresAtMs
});
const openWebRxPath = String(ctx.getSetting("upstreamPath", ctx.env.OPENWEBRX_PATH || "/openwebrx/")).trim() || "/openwebrx/";
const separator = openWebRxPath.includes("?") ? "&" : "?";
const iframeUrl = `${openWebRxPath}${separator}ticket=${encodeURIComponent(ticket)}`;
return {
ticket,
expiresAt: new Date(expiresAtMs).toISOString(),
iframeUrl: openWebRxPath,
iframeUrl,
userId
};
}