From 33f49505a6686fa67ffaaf6387b5458ca2618449 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 26 Jan 2024 16:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20enable=5Fnginx=20=E9=80=89?= =?UTF-8?q?=E9=A1=B9=EF=BC=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/config.rs b/src/config.rs index 9c38dee..721ac04 100644 --- a/src/config.rs +++ b/src/config.rs @@ -17,6 +17,8 @@ pub struct Config { pub disable_access_log: bool, /// FORCE_NOOPEN pub force_noopen: bool, + /// ENABLE_NGINX + pub enable_nginx: bool, } impl Config { @@ -50,6 +52,10 @@ impl Config { .unwrap_or_else(|_| "false".to_string()) .parse::() .expect("FORCE_NOOPEN must be true or false"); + let enable_nginx = std::env::var("ENABLE_NGINX") + .unwrap_or_else(|_| "false".to_string()) + .parse::() + .expect("ENABLE_NGINX must be true or false"); Self { cluster_port, cluster_id, @@ -58,6 +64,7 @@ impl Config { no_demaon, disable_access_log, force_noopen, + enable_nginx, } } }