Techdocs: Include cookies when requesting SVGs
Signed-off-by: Gowind <petrovgovind@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Include cookies when making fetch requests for SVG from techdocs plugin
|
||||
@@ -64,7 +64,7 @@ export const addBaseUrl = ({
|
||||
const apiOrigin = await techdocsStorageApi.getApiOrigin();
|
||||
if (isSvgNeedingInlining(attributeName, elemAttribute, apiOrigin)) {
|
||||
try {
|
||||
const svg = await fetch(newValue);
|
||||
const svg = await fetch(newValue, { credentials: 'include' });
|
||||
const svgContent = await svg.text();
|
||||
elem.setAttribute(
|
||||
attributeName,
|
||||
|
||||
Reference in New Issue
Block a user