Techdocs: Include cookies when requesting SVGs

Signed-off-by: Gowind <petrovgovind@gmail.com>
This commit is contained in:
Gowind
2021-06-29 10:58:09 +02:00
parent 80b1c89385
commit 99a2873c76
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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,