chore(gitlabUrlReader): Add comment and patch file

Signed-off-by: Stijn Brouwers <stijn@bdcommit.com>
This commit is contained in:
Stijn Brouwers
2026-05-28 09:26:05 +02:00
parent 05d4126db0
commit 3692a346a5
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Fix 406 response for repository/archive retrieval in gitlabUrlReader
@@ -211,6 +211,9 @@ export class GitlabUrlReader implements UrlReaderService {
)}/repository/archive?${archiveReqParams.toString()}`;
const archiveGitLabResponse = await this.integration.fetch(reqUrl, {
...getGitLabRequestOptions(this.integration.config, token),
// The mode is set to 'same-origin' to overwrite the default 'cors' value.
// The repository/archive endpoint marks mode='cors' as a "hotlink" which will return 406 - Not Acceptable as a response
// More info on this issue can be found @ https://github.com/backstage/backstage/issues/34395
mode: 'same-origin',
// TODO(freben): The signal cast is there because pre-3.x versions of
// node-fetch have a very slightly deviating AbortSignal type signature.