include OpenWebRX ticket in issued session URLs
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user