diff --git a/.changeset/clean-plums-crash.md b/.changeset/clean-plums-crash.md new file mode 100644 index 0000000000..77cd94f097 --- /dev/null +++ b/.changeset/clean-plums-crash.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs-backend': patch +--- + +Forward authorization header on backend request if present diff --git a/.changeset/old-coats-suffer.md b/.changeset/old-coats-suffer.md index 8391f77ee0..5938c60b1e 100644 --- a/.changeset/old-coats-suffer.md +++ b/.changeset/old-coats-suffer.md @@ -2,4 +2,4 @@ '@backstage/plugin-techdocs': minor --- -Add authorization header on techdocs api requests +Add authorization header on techdocs api requests. Breaking change as clients now needs the Identity API. diff --git a/plugins/techdocs/src/api.ts b/plugins/techdocs/src/api.ts index ea176f26eb..6de94b63bb 100644 --- a/plugins/techdocs/src/api.ts +++ b/plugins/techdocs/src/api.ts @@ -171,7 +171,6 @@ export class TechDocsStorageApi implements TechDocsStorage { const request = await fetch( `${url.endsWith('/') ? url : `${url}/`}index.html`, { - credentials: 'include', headers: token ? { Authorization: `Bearer ${token}` } : {}, }, );