Fix auth_required comparison
This commit is contained in:
+4
-1
@@ -31,5 +31,8 @@ pub static SERVER_INFO: Lazy<ServerInfo> = Lazy::new(|| ServerInfo {
|
|||||||
software: "https://git.moe.gift/laoxong/nostr-relay",
|
software: "https://git.moe.gift/laoxong/nostr-relay",
|
||||||
supported_nips: vec![1, 2, 5, 42, 65],
|
supported_nips: vec![1, 2, 5, 42, 65],
|
||||||
version: env!("CARGO_PKG_VERSION"), // 从 Cargo.toml 获取版本
|
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",
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user