From d3d8f6ff5744aa55e41f32585c2ed5ced091bf1d Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 29 Jul 2022 01:37:47 +0200 Subject: [PATCH] fix(core): update --- ts/00_commitinfo_data.ts | 2 +- ts/smartproxy.classes.networkproxy.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index f316f42..e283046 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartproxy', - version: '3.0.3', + version: '3.0.4', description: 'a proxy for handling high workloads of proxying' } diff --git a/ts/smartproxy.classes.networkproxy.ts b/ts/smartproxy.classes.networkproxy.ts index ea030e5..69abb68 100644 --- a/ts/smartproxy.classes.networkproxy.ts +++ b/ts/smartproxy.classes.networkproxy.ts @@ -310,6 +310,14 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g= 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() { const done = plugins.smartpromise.defer(); this.httpsServer.close(() => {