Fix auth_required comparison

This commit is contained in:
2025-08-04 03:18:48 +08:00
parent 8ba270156a
commit fb7a633d14
+4 -1
View File
@@ -31,5 +31,8 @@ pub static SERVER_INFO: Lazy<ServerInfo> = Lazy::new(|| ServerInfo {
software: "https://git.moe.gift/laoxong/nostr-relay",
supported_nips: vec![1, 2, 5, 42, 65],
version: env!("CARGO_PKG_VERSION"), // 从 Cargo.toml 获取版本
auth_required: env::var("AUTH_REQUIRED").unwrap_or_else(|_| "False".to_string()) == "True",
auth_required: env::var("AUTH_REQUIRED")
.unwrap_or_else(|_| "false".to_string())
.to_lowercase()
== "true",
});