Skip to content
Snippets Groups Projects
Commit 9f62aa8a authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: public download

parent 81947bed
No related branches found
No related tags found
No related merge requests found
......@@ -36,9 +36,11 @@ export class DownloadService {
});
const requestHeaders: HeadersInit = new Headers();
const token = this.oauth2Service.getAccessToken();
requestHeaders.set("Content-Type", "application/json");
requestHeaders.set("Authorization", "Bearer " + token);
const token = this.oauth2Service.getAccessToken();
if (!isNullOrUndefined(token)) {
requestHeaders.set("Authorization", "Bearer " + token);
}
return from(
fetch(url, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment