FrontendHostDiscovery.fromConfig()
Home > @backstage/core-app-api > FrontendHostDiscovery > fromConfig
Creates a new FrontendHostDiscovery discovery instance by reading the external target URL from the discovery.endpoints config section.
eg.
discovery:
endpoints:
- target: https://internal.example.com/internal-catalog
plugins: [catalog]
- target: https://internal.example.com/secure/api/{{pluginId}}
plugins: [auth, permissions]
- target:
internal: https://internal.example.com/search
external: https://example.com/search
plugins: [search]
If a plugin is not declared in the config, the discovery will fall back to using the baseUrl with the provided pathPattern appended. The default path pattern is "/api/{{ pluginId }}".
Signature:
static fromConfig(config: Config, options?: {
pathPattern?: string;
}): FrontendHostDiscovery;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
config | ||
|
options |
{ pathPattern?: string; } |
(Optional) |