From 5da668e6b74ca2590bfc8cc225a90006a7ce60d2 Mon Sep 17 00:00:00 2001 From: kwikwag <392199+kwikwag@users.noreply.github.com> Date: Sat, 11 Jan 2025 15:35:27 +0200 Subject: [PATCH] fix: deprecation DEP0060, use Object.extend instead of util._extend See https://nodejs.org/api/deprecations.html#DEP0060 --- lib/http-proxy/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/http-proxy/index.js b/lib/http-proxy/index.js index 977a4b362..9b9bf5a2f 100644 --- a/lib/http-proxy/index.js +++ b/lib/http-proxy/index.js @@ -1,5 +1,4 @@ var httpProxy = module.exports, - extend = require('util')._extend, parse_url = require('url').parse, EE3 = require('eventemitter3'), http = require('http'), @@ -47,9 +46,9 @@ function createRightProxy(type) { args[cntr] !== res ) { //Copy global options - requestOptions = extend({}, options); + requestOptions = Object.extend({}, options); //Overwrite with request options - extend(requestOptions, args[cntr]); + Object.extend(requestOptions, args[cntr]); cntr--; }