Merge pull request #10172 from backstage/freben/auth-more

make sure to pass in the auth token to the ancestry endpoint
This commit is contained in:
Fredrik Adelöw
2022-03-14 15:03:30 +01:00
committed by GitHub
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Pass in auth token to ancestry endpoint
@@ -158,7 +158,9 @@ export async function createRouter(
async (req, res) => {
const { kind, namespace, name } = req.params;
const entityRef = stringifyEntityRef({ kind, namespace, name });
const response = await entitiesCatalog.entityAncestry(entityRef);
const response = await entitiesCatalog.entityAncestry(entityRef, {
authorizationToken: getBearerToken(req.header('authorization')),
});
res.status(200).json(response);
},
)