--- plugins/securityDashboards/server/utils/next_url.js.orig	2026-06-04 21:40:15 UTC
+++ plugins/securityDashboards/server/utils/next_url.js
@@ -6,7 +6,6 @@ exports.validateNextUrl = validateNextUrl;
 exports.INVALID_NEXT_URL_PARAMETER_MESSAGE = void 0;
 exports.composeNextUrlQueryParam = composeNextUrlQueryParam;
 exports.validateNextUrl = validateNextUrl;
-var _url = require("url");
 var _encode_uri_query = require("../../../../src/plugins/opensearch_dashboards_utils/common/url/encode_uri_query");
 var _http = require("../../../../src/core/server/http");
 /*
@@ -27,7 +26,7 @@ function composeNextUrlQueryParam(request, basePath) {
 function composeNextUrlQueryParam(request, basePath) {
   try {
     const currentUrl = request.url.toString();
-    const parsedUrl = (0, _url.parse)(currentUrl, true);
+    const parsedUrl = new URL('', currentUrl);
     const nextUrl = parsedUrl === null || parsedUrl === void 0 ? void 0 : parsedUrl.path;
     if (!!nextUrl && nextUrl !== '/') {
       return `nextUrl=${(0, _encode_uri_query.encodeUriQuery)((0, _http.getRedirectUrl)({
@@ -68,4 +67,4 @@ function validateNextUrl(url, basePath) {
     }
   }
 }
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 5936 characters]
\ No newline at end of file
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 5936 characters]
