Merge pull request #26088 from oskarjiang/fix/use-separate-token-for-cache-sync
techdocs-backend: separate request token for cache sync
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-backend': patch
|
||||
---
|
||||
|
||||
Dedicated token for techdocs cache sync
|
||||
@@ -252,10 +252,14 @@ export async function createRouter(
|
||||
// However, if caching is enabled, take the opportunity to check and
|
||||
// invalidate stale cache entries.
|
||||
if (cache) {
|
||||
const { token: techDocsToken } = await auth.getPluginRequestToken({
|
||||
onBehalfOf: await auth.getOwnServiceCredentials(),
|
||||
targetPluginId: 'techdocs',
|
||||
});
|
||||
await docsSynchronizer.doCacheSync({
|
||||
responseHandler,
|
||||
discovery,
|
||||
token,
|
||||
token: techDocsToken,
|
||||
entity,
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user