fix(plugins/catalog-backend-module-backstage-openapi): do not route request through external url but rather the internal one

Signed-off-by: secustor <sebastian@poxhofer.at>
This commit is contained in:
secustor
2024-03-28 15:35:40 +01:00
parent ff6a8f06b5
commit 58763e875f
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-backstage-openapi': patch
---
Use direct access of openapi.json files and not external route
@@ -122,7 +122,7 @@ const loadSpecs = async ({
}) => {
const specs: OpenAPIObject[] = [];
for (const pluginId of plugins) {
const url = await discovery.getExternalBaseUrl(pluginId);
const url = await discovery.getBaseUrl(pluginId);
const openApiUrl = getOpenApiSpecRoute(url);
const { token } = await auth.getPluginRequestToken({
onBehalfOf: await auth.getOwnServiceCredentials(),