mia-platform/custom-plugin-lib

Missing "prefix" parameter in Service creation of getDirectServiceProxyFromUrlString function

calairoh opened this issue · 1 comments

When a URL is passed to the getDirectServiceProxyFromUrlString function, the created Service object does not contain the path of the passed URL as prefix.

The code snippet below shows the way in which the Service object is built:

return serviceBuilder(
    completeUrl.hostname,
    requestMiaHeaders,
    {
      protocol: completeUrl.protocol,
      port: completeUrl.port,
      ...baseOptions,
    })

Example: if the URL is http://example.com/path, /path is not considered when building the Service object.

This is now possible with the new http client and it will be released soon. I close the issue, since the other proxies are now deprecated.