Skip to content
Snippets Groups Projects

Fixes #1: ShareUrl: Dynamically created by client

Closed Fixes #1: ShareUrl: Dynamically created by client
2 unresolved threads
Closed Francesco Gramegna requested to merge gramegna/webapp-lib:DynamicalShareLink into main
2 unresolved threads
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -275,7 +275,7 @@ case class AppPage(appId: AppId, uiId: UIId, instanceId: InstanceId, userId: Use
@@ -275,7 +275,7 @@ case class AppPage(appId: AppId, uiId: UIId, instanceId: InstanceId, userId: Use
.replace("{{hostName}}", hostName + (if port.nonEmpty then f":$port" else ""))
.replace("{{hostName}}", hostName + (if port.nonEmpty then f":$port" else ""))
.replace("{{userId}}", URLEncoder.encode(userId, "UTF-8"))
.replace("{{userId}}", URLEncoder.encode(userId, "UTF-8"))
val shareUrlHost =
val shareUrlHost =
if hostName == "localhost" then appInfo.hostAddress else hostName
if (hostName == "localhost" || hostname == "127.0.0.1") then appInfo.hostAddress else hostName
val shareUrl = f"$hypertextProtocol://${shareUrlHost}${if port.nonEmpty then f":$port" else ""}${appInfo.shareSubUrl}"
val shareUrl = f"$hypertextProtocol://${shareUrlHost}${if port.nonEmpty then f":$port" else ""}${appInfo.shareSubUrl}"
Loading