@certd/acme-client 1.38.8 → 1.38.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/http.js +3 -2
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Simple and unopinionated ACME client",
4
4
  "private": false,
5
5
  "author": "nmorsman",
6
- "version": "1.38.8",
6
+ "version": "1.38.9",
7
7
  "type": "module",
8
8
  "module": "scr/index.js",
9
9
  "main": "src/index.js",
@@ -18,7 +18,7 @@
18
18
  "types"
19
19
  ],
20
20
  "dependencies": {
21
- "@certd/basic": "^1.38.8",
21
+ "@certd/basic": "^1.38.9",
22
22
  "@peculiar/x509": "^1.11.0",
23
23
  "asn1js": "^3.0.5",
24
24
  "axios": "^1.9.0",
@@ -70,5 +70,5 @@
70
70
  "bugs": {
71
71
  "url": "https://github.com/publishlab/node-acme-client/issues"
72
72
  },
73
- "gitHead": "4fda6cbcde3d398d7f4dc3ee7e8ea90e691098db"
73
+ "gitHead": "b30cb5d7dc8311af4863da7dc8781f7264ba0545"
74
74
  }
package/src/http.js CHANGED
@@ -74,8 +74,9 @@ class HttpClient {
74
74
  if (this.urlMapping && this.urlMapping.enabled && this.urlMapping.mappings) {
75
75
  // eslint-disable-next-line no-restricted-syntax
76
76
  for (const key in this.urlMapping.mappings) {
77
+ const value = this.urlMapping.mappings[key];
77
78
  if (url.includes(key)) {
78
- const newUrl = url.replace(key, this.urlMapping.mappings[key]);
79
+ const newUrl = url.replace(key, value);
79
80
  this.log(`use reverse proxy: ${newUrl}`);
80
81
  url = newUrl;
81
82
  }
@@ -193,7 +194,7 @@ class HttpClient {
193
194
  const dir = await this.getDirectory();
194
195
 
195
196
  if (!dir[resource]) {
196
- throw new Error(`Unable to locate API resource URL in ACME directory: "${resource}"`);
197
+ throw new Error(`Unable to locate API resource URL in ACME directory: "${resource}",获取ACME接口地址信息失败,可能网络不稳定或该证书颁发机构服务器崩溃,目录地址:${this.directoryUrl},请测试地址是否可以正常访问并显示json格式的URL地址列表`);
197
198
  }
198
199
 
199
200
  return dir[resource];