fix(core): update

This commit is contained in:
Philipp Kunz 2022-07-29 01:37:47 +02:00
parent 906661c7f4
commit d3d8f6ff57
2 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartproxy', name: '@pushrocks/smartproxy',
version: '3.0.3', version: '3.0.4',
description: 'a proxy for handling high workloads of proxying' description: 'a proxy for handling high workloads of proxying'
} }

View File

@ -310,6 +310,14 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
this.httpsServer.listen(this.port); */ this.httpsServer.listen(this.port); */
} }
public async addDefaultHeaders(headersArg: {
[key: string]: string;
}) {
for (const headerKey of Object.keys(headersArg)) {
this.defaultHeaders[headerKey] = headersArg[headerKey];
}
}
public async stop() { public async stop() {
const done = plugins.smartpromise.defer(); const done = plugins.smartpromise.defer();
this.httpsServer.close(() => { this.httpsServer.close(() => {