From bf6754c69c2676fe4acbab0ffd59c3c27c06bea3 Mon Sep 17 00:00:00 2001 From: tejgokani Date: Tue, 19 May 2026 13:17:09 +0530 Subject: [PATCH] fix: replace deprecated trimRight() with trimEnd() --- lib/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request.js b/lib/request.js index e7a451df6d9..68243f52b6d 100644 --- a/lib/request.js +++ b/lib/request.js @@ -424,7 +424,7 @@ defineGetter(req, 'host', function host(){ } else if (val.indexOf(',') !== -1) { // Note: X-Forwarded-Host is normally only ever a // single value, but this is to be safe. - val = val.substring(0, val.indexOf(',')).trimRight() + val = val.substring(0, val.indexOf(',')).trimEnd() } return val || undefined;