Add custom client judgment for hide cm (#11563)

There is latency in the HTTP request; add a custom client check to avoid the PRO variable being unset during application startup

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2025-04-25 17:13:19 +08:00 committed by GitHub
parent 198967ea35
commit c0789a5fc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -494,7 +494,7 @@ async fn handle(data: Data, stream: &mut Connection) {
None
};
} else if name == "hide_cm" {
value = if crate::hbbs_http::sync::is_pro() {
value = if crate::hbbs_http::sync::is_pro() || crate::common::is_custom_client() {
Some(hbb_common::password_security::hide_cm().to_string())
} else {
None