Media Library failing to load with url field set in server.js

UPDATE

I made some tests with the file appendSearchParamsToUrl.js adding some rows to modify the url and window.strapi.backendURL parameters.
The solution is not good because the problem is the composition of those parameters elsewhere but with this change I can use media now.

I’m waiting for a correct patch. This is a blocking issue.
Thank you

Temporary patch for appendSearchParamsToUrl.js

/**
 * Append the given search params to the given URL.
 *
 * @param {String} url The URL string to append the search params to
 * @param {Object} params The object of search params to append to the URL
 * @returns {String} A string representing the URL with the search params appended
 */
const appendSearchParamsToUrl = ({ url, params }) => {
  if (url === undefined || typeof params !== 'object') {
    return url;
  }

  var blob = url.split(':')[0] === 'blob'? 'blob:': '';
  if(blob) url = url.replace('blob:', '');
  url = url.replace(window.origin, '').replace(window.strapi.backendURL, '');
  if(!window.strapi.backendURL.startsWith(window.origin)) window.strapi.backendURL = window.origin + window.strapi.backendURL;
  if(!url.startsWith(window.strapi.backendURL)) url = blob + window.strapi.backendURL + url;
  
  console.log('*** STRAPI *** append', {url, params, origin: window.origin, backendURL: window.strapi.backendURL});
  const urlObj = new URL(url, window.strapi.backendURL);

  Object.entries(params).forEach(([key, value]) => {
    if (value !== undefined) {
      urlObj.searchParams.append(key, value);
    }
  });

  return urlObj.toString();
};

export { appendSearchParamsToUrl };