Skip to content

Commit

Permalink
fix: removed withCredentials in representation service (#1965)
Browse files Browse the repository at this point in the history
  • Loading branch information
irmastnt authored Dec 4, 2024
1 parent 7c04fd7 commit 3b0feab
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpClient, HttpResponse } from '@angular/common/http';
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import {
ReadArchiveFileValue,
Expand Down Expand Up @@ -95,15 +95,14 @@ export class RepresentationService {
const withCredentials = isLoggedIn && userCanView;
if (withCredentials) {
const authToken = this._accessTokenService.getAccessToken();
headers = {
headers = new HttpHeaders({
Authorization: `Bearer ${authToken}`,
};
});
}

this._http
.get(userCanView ? `${url}/original` : url, {
responseType: 'blob',
withCredentials,
headers,
observe: 'response',
})
Expand Down

0 comments on commit 3b0feab

Please sign in to comment.