From 8da278a2797e970da12010fdd60c65592c572e6c Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 14 Oct 2019 01:53:28 +0900 Subject: [PATCH] =?UTF-8?q?Update=20https-proxy-agent=20=E3=81=AA=E3=81=A9?= =?UTF-8?q?=20(#5497)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use proxy for web-push * https-proxy-agent 3.0.0 --- package.json | 3 ++- src/services/push-notification.ts | 4 +++- yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c6b8fd022..951d14612 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ }, "resolutions": { "gulp-cssnano/cssnano/postcss-svgo/svgo/js-yaml": "^3.13.1", + "https-proxy-agent": "^3.0.0", "lodash": "^4.17.13" }, "dependencies": { @@ -146,7 +147,7 @@ "hard-source-webpack-plugin": "0.13.1", "html-minifier": "4.0.0", "http-signature": "1.2.0", - "https-proxy-agent": "2.2.2", + "https-proxy-agent": "3.0.0", "insert-text-at-cursor": "0.3.0", "is-root": "2.1.0", "is-svg": "4.2.0", diff --git a/src/services/push-notification.ts b/src/services/push-notification.ts index da1c1dbf5..fa7cacfdc 100644 --- a/src/services/push-notification.ts +++ b/src/services/push-notification.ts @@ -29,7 +29,9 @@ export default async function(userId: string, type: string, body?: any) { push.sendNotification(pushSubscription, JSON.stringify({ type, body - })).catch((err: any) => { + }), { + proxy: config.proxy + }).catch((err: any) => { //swLogger.info(err.statusCode); //swLogger.info(err.headers); //swLogger.info(err.body); diff --git a/yarn.lock b/yarn.lock index 0389a30d4..94681ea51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5402,10 +5402,10 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@2.2.2, https-proxy-agent@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz#271ea8e90f836ac9f119daccd39c19ff7dfb0793" - integrity sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg== +https-proxy-agent@3.0.0, https-proxy-agent@^2.2.1, https-proxy-agent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.0.tgz#0106efa5d63d6d6f3ab87c999fa4877a3fd1ff97" + integrity sha512-y4jAxNEihqvBI5F3SaO2rtsjIOnnNA8sEbuiP+UhJZJHeM2NRm6c09ax2tgqme+SgUUvjao2fJXF4h3D6Cb2HQ== dependencies: agent-base "^4.3.0" debug "^3.1.0"