Add custom client judgment for hide cm (#11563)
Some checks are pending
CI / ${{ matrix.job.target }} (${{ matrix.job.os }}) (map[os:ubuntu-22.04 target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Full Flutter CI / run-ci (push) Waiting to run

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