fix(core): update

This commit is contained in:
2022-07-29 01:52:34 +02:00
parent 17eaea4124
commit ca4ddade17
9 changed files with 28 additions and 55 deletions

View File

@@ -6,7 +6,6 @@ export interface INetworkProxyOptions {
}
export class NetworkProxy {
// INSTANCE
public options: INetworkProxyOptions;
public proxyConfigs: plugins.tsclass.network.IReverseProxyConfig[] = [];
@@ -248,7 +247,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
});
});
this.httpsServer.keepAliveTimeout = 61000;
this.httpsServer.headersTimeout = 65000;
this.httpsServer.headersTimeout = 65000;
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
connection.setTimeout(120000);
@@ -276,7 +275,9 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
});
this.httpsServer.listen(this.options.port);
console.log(`ProxyWorker -> OK: now listening for new connections on port ${this.options.port}`);
console.log(
`ProxyWorker -> OK: now listening for new connections on port ${this.options.port}`
);
}
public async updateProxyConfigs(proxyConfigsArg: plugins.tsclass.network.IReverseProxyConfig[]) {
@@ -310,9 +311,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
this.httpsServer.listen(this.port); */
}
public async addDefaultHeaders(headersArg: {
[key: string]: string;
}) {
public async addDefaultHeaders(headersArg: { [key: string]: string }) {
for (const headerKey of Object.keys(headersArg)) {
this.defaultHeaders[headerKey] = headersArg[headerKey];
}