@certd/lib-server 1.38.6 → 1.38.8
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.
|
@@ -47,6 +47,7 @@ export declare class SysPrivateSettings extends BaseSettings {
|
|
|
47
47
|
encryptSecret?: string;
|
|
48
48
|
httpsProxy?: string;
|
|
49
49
|
httpProxy?: string;
|
|
50
|
+
reverseProxies?: Record<string, string>;
|
|
50
51
|
dnsResultOrder?: string;
|
|
51
52
|
commonCnameEnabled?: boolean;
|
|
52
53
|
httpRequestTimeout?: number;
|
|
@@ -12,10 +12,10 @@ import { InjectEntityModel } from '@midwayjs/typeorm';
|
|
|
12
12
|
import { Repository } from 'typeorm';
|
|
13
13
|
import { SysSettingsEntity } from '../entity/sys-settings.js';
|
|
14
14
|
import { SysInstallInfo, SysPrivateSettings, SysPublicSettings, SysSecret, SysSecretBackup } from './models.js';
|
|
15
|
-
import {
|
|
16
|
-
import { cache, logger, setGlobalProxy } from '@certd/basic';
|
|
15
|
+
import { getAllSslProviderDomains, setSslProviderReverseProxies } from '@certd/acme-client';
|
|
16
|
+
import { cache, logger, mergeUtils, setGlobalProxy } from '@certd/basic';
|
|
17
17
|
import * as dns from 'node:dns';
|
|
18
|
-
import {
|
|
18
|
+
import { BaseService } from '../../../basic/index.js';
|
|
19
19
|
import { executorQueue } from '../../basic/service/executor-queue.js';
|
|
20
20
|
const { merge } = mergeUtils;
|
|
21
21
|
/**
|
|
@@ -114,7 +114,14 @@ let SysSettingsService = class SysSettingsService extends BaseService {
|
|
|
114
114
|
await this.saveSetting(bean);
|
|
115
115
|
}
|
|
116
116
|
async getPrivateSettings() {
|
|
117
|
-
|
|
117
|
+
const res = await this.getSetting(SysPrivateSettings);
|
|
118
|
+
const sslProviderDomains = getAllSslProviderDomains();
|
|
119
|
+
for (const domain of sslProviderDomains) {
|
|
120
|
+
if (!res.reverseProxies[domain]) {
|
|
121
|
+
res.reverseProxies[domain] = "";
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return res;
|
|
118
125
|
}
|
|
119
126
|
async savePrivateSettings(bean) {
|
|
120
127
|
await this.saveSetting(bean);
|
|
@@ -134,6 +141,7 @@ let SysSettingsService = class SysSettingsService extends BaseService {
|
|
|
134
141
|
if (bean.pipelineMaxRunningCount) {
|
|
135
142
|
executorQueue.setMaxRunningCount(bean.pipelineMaxRunningCount);
|
|
136
143
|
}
|
|
144
|
+
setSslProviderReverseProxies(bean.reverseProxies);
|
|
137
145
|
}
|
|
138
146
|
async updateByKey(key, setting) {
|
|
139
147
|
const entity = await this.getByKey(key);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certd/lib-server",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.8",
|
|
4
4
|
"description": "midway with flyway, sql upgrade way ",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "AGPL",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@certd/acme-client": "^1.38.
|
|
32
|
-
"@certd/basic": "^1.38.
|
|
33
|
-
"@certd/pipeline": "^1.38.
|
|
34
|
-
"@certd/plugin-lib": "^1.38.
|
|
35
|
-
"@certd/plus-core": "^1.38.
|
|
31
|
+
"@certd/acme-client": "^1.38.8",
|
|
32
|
+
"@certd/basic": "^1.38.8",
|
|
33
|
+
"@certd/pipeline": "^1.38.8",
|
|
34
|
+
"@certd/plugin-lib": "^1.38.8",
|
|
35
|
+
"@certd/plus-core": "^1.38.8",
|
|
36
36
|
"@midwayjs/cache": "3.14.0",
|
|
37
37
|
"@midwayjs/core": "3.20.11",
|
|
38
38
|
"@midwayjs/i18n": "3.20.13",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"typeorm": "^0.3.11",
|
|
65
65
|
"typescript": "^5.4.2"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "4fda6cbcde3d398d7f4dc3ee7e8ea90e691098db"
|
|
68
68
|
}
|