diff options
author | metamuffin <metamuffin@disroot.org> | 2024-01-30 17:00:45 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-01-30 17:00:45 +0100 |
commit | 39a4b10789ff9f97ddc3de7d55bc845cabaac333 (patch) | |
tree | 1d12837368cf7e5b529b096e60d8e7ef1480081d | |
parent | ef88eba498d0362137bcc9203a4cf1a20b6dec9e (diff) | |
download | jellything-39a4b10789ff9f97ddc3de7d55bc845cabaac333.tar jellything-39a4b10789ff9f97ddc3de7d55bc845cabaac333.tar.bz2 jellything-39a4b10789ff9f97ddc3de7d55bc845cabaac333.tar.zst |
https for native url
-rw-r--r-- | common/src/config.rs | 1 | ||||
-rw-r--r-- | server/src/routes/ui/player.rs | 3 |
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, |