Skip to main content
Version: Next

FetchMiddlewares.resolvePluginProtocol()

Home > @backstage/core-app-api > FetchMiddlewares > resolvePluginProtocol

Handles translation from plugin:// URLs to concrete http(s) URLs based on the discovery API.

Signature:

static resolvePluginProtocol(options: {
discoveryApi: DiscoveryApi;
}): FetchMiddleware;

Parameters

Parameter

Type

Description

options

{ discoveryApi: DiscoveryApi; }

**Returns:**

FetchMiddleware

Remarks

If the request is for plugin://catalog/entities?filter=x=y, the discovery API will be queried for 'catalog'. If it returned https://backstage.example.net/api/catalog, the resulting query would be https://backstage.example.net/api/catalog/entities?filter=x=y.

If the incoming URL protocol was not plugin, the request is just passed through verbatim to the underlying implementation.