aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/src/config.rs1
-rw-r--r--server/src/routes/ui/player.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/common/src/config.rs b/common/src/config.rs
index ff367c3..e9f163b 100644
--- a/common/src/config.rs
+++ b/common/src/config.rs
@@ -14,6 +14,7 @@ pub struct GlobalConfig {
pub hostname: String,
pub brand: String,
pub slogan: String,
+ #[serde(default = "return_true" )] pub tls: bool,
#[serde(default = "default::asset_path")] pub asset_path: PathBuf,
#[serde(default = "default::database_path")] pub database_path: PathBuf,
#[serde(default = "default::library_path")] pub library_path: PathBuf,
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs
index becda91..712f7fb 100644
--- a/server/src/routes/ui/player.rs
+++ b/server/src/routes/ui/player.rs
@@ -48,7 +48,8 @@ impl PlayerConfig {
fn jellynative_url(action: &str, secret: &str, node: &str) -> String {
format!(
- "jellynative://{action}/{secret}/http://{}{}",
+ "jellynative://{action}/{secret}/{}://{}{}",
+ if CONF.tls { "https" } else { "http" },
CONF.hostname,
uri!(r_stream(
node,