mirror of
https://github.com/certd/certd.git
synced 2026-04-27 23:37:29 +08:00
chore: docs directory 不稳定提示
This commit is contained in:
@@ -74,8 +74,9 @@ class HttpClient {
|
|||||||
if (this.urlMapping && this.urlMapping.enabled && this.urlMapping.mappings) {
|
if (this.urlMapping && this.urlMapping.enabled && this.urlMapping.mappings) {
|
||||||
// eslint-disable-next-line no-restricted-syntax
|
// eslint-disable-next-line no-restricted-syntax
|
||||||
for (const key in this.urlMapping.mappings) {
|
for (const key in this.urlMapping.mappings) {
|
||||||
|
const value = this.urlMapping.mappings[key];
|
||||||
if (url.includes(key)) {
|
if (url.includes(key)) {
|
||||||
const newUrl = url.replace(key, this.urlMapping.mappings[key]);
|
const newUrl = url.replace(key, value);
|
||||||
this.log(`use reverse proxy: ${newUrl}`);
|
this.log(`use reverse proxy: ${newUrl}`);
|
||||||
url = newUrl;
|
url = newUrl;
|
||||||
}
|
}
|
||||||
@@ -193,7 +194,7 @@ class HttpClient {
|
|||||||
const dir = await this.getDirectory();
|
const dir = await this.getDirectory();
|
||||||
|
|
||||||
if (!dir[resource]) {
|
if (!dir[resource]) {
|
||||||
throw new Error(`Unable to locate API resource URL in ACME directory: "${resource}"`);
|
throw new Error(`Unable to locate API resource URL in ACME directory: "${resource}",获取ACME接口地址信息失败,可能网络不稳定或该证书颁发机构服务器崩溃,目录地址:${this.directoryUrl},请测试地址是否可以正常访问并显示json格式的URL地址列表`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dir[resource];
|
return dir[resource];
|
||||||
|
|||||||
Reference in New Issue
Block a user