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