From 2590d0d09aeee48c7448a06fb1b40502034defbb Mon Sep 17 00:00:00 2001 From: AmbitiousApprentice Date: Tue, 27 May 2025 10:51:14 -0400 Subject: [PATCH] Update common.js Updated deprecated util._extend to Object.assign --- lib/http-proxy/common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/http-proxy/common.js b/lib/http-proxy/common.js index 6513e81d8..dc8af320d 100644 --- a/lib/http-proxy/common.js +++ b/lib/http-proxy/common.js @@ -1,6 +1,6 @@ var common = exports, url = require('url'), - extend = require('util')._extend, + ObjectAssign = Object.assign, required = require('requires-port'); var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i, @@ -40,10 +40,10 @@ common.setupOutgoing = function(outgoing, options, req, forward) { ); outgoing.method = options.method || req.method; - outgoing.headers = extend({}, req.headers); + outgoing.headers = ObjectAssign({}, req.headers); if (options.headers){ - extend(outgoing.headers, options.headers); + ObjectAssign(outgoing.headers, options.headers); } if (options.auth) {