From 71e6a50414470483ac95abe35bbb6b0f0a2dc886 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Sun, 3 May 2026 17:36:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=81=E4=B9=A6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sdlan_util.erl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sdlan_util.erl b/src/sdlan_util.erl index 6d12a45..d49397f 100644 --- a/src/sdlan_util.erl +++ b/src/sdlan_util.erl @@ -173,7 +173,11 @@ certificate_config() -> {ok, Props} = application:get_env(sdlan, certificate), CertFile = proplists:get_value(certfile, Props), KeyFile = proplists:get_value(keyfile, Props), + %% 获取环境变量 - Path = os:getenv("QUIC_CERT_PATH"), - % 必选:QUIC/TLS证书配置 - {Path ++ "/" ++ CertFile, Path ++ "/" ++ KeyFile}. \ No newline at end of file + case os:getenv("QUIC_CERT_PATH") of + false -> + {CertFile, KeyFile}; + Path -> + {Path ++ "/" ++ CertFile, Path ++ "/" ++ KeyFile} + end. \ No newline at end of file