no api for unregistered device

This commit is contained in:
rustdesk
2025-05-24 09:21:06 +08:00
parent 01146574f2
commit 777c25bba2
2 changed files with 4 additions and 2 deletions

View File

@@ -960,6 +960,9 @@ pub fn get_custom_rendezvous_server(custom: String) -> String {
#[inline]
pub fn get_api_server(api: String, custom: String) -> String {
if Config::no_register_device() {
return "".to_owned();
}
let mut res = get_api_server_(api, custom);
if res.ends_with('/') {
res.pop();