1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

native fetch with proxy support on node api

This commit is contained in:
Kyle Spearrin
2019-06-24 11:07:26 -04:00
parent 6d82fb5bbc
commit bc5a6e02c1
8 changed files with 78 additions and 14 deletions

View File

@@ -794,7 +794,8 @@ export class CipherService implements CipherServiceAbstraction {
private async shareAttachmentWithServer(attachmentView: AttachmentView, cipherId: string,
organizationId: string): Promise<any> {
const attachmentResponse = await fetch(new Request(attachmentView.url, { cache: 'no-cache' }));
const attachmentResponse = await this.apiService.nativeFetch(
new Request(attachmentView.url, { cache: 'no-cache' }));
if (attachmentResponse.status !== 200) {
throw Error('Failed to download attachment: ' + attachmentResponse.status.toString());
}