From 374d2661c0bdd8213928355ffe7173d083660676 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 25 Feb 2024 00:17:18 +0100 Subject: [PATCH] Removed allow cors --- frontend/src/app/download/download.component.ts | 9 --------- frontend/src/app/upload/upload.component.ts | 2 -- 2 files changed, 11 deletions(-) diff --git a/frontend/src/app/download/download.component.ts b/frontend/src/app/download/download.component.ts index bc9e3b5..ca70a4c 100644 --- a/frontend/src/app/download/download.component.ts +++ b/frontend/src/app/download/download.component.ts @@ -101,9 +101,6 @@ export class DownloadComponent { method: 'get', url: this.developmentStore.getBaseUrl() + 'api/v1/speed-test', responseType: 'arraybuffer', - headers: { - 'Access-Control-Allow-Origin': '*', // Allow CORS - } }) .then(response => { const end = new Date().getTime(); // End timer @@ -124,9 +121,6 @@ export class DownloadComponent { method: 'get', url: this.developmentStore.getBaseUrl() + 'api/v1/download-info?fileId=' + this.fileId, responseType: 'json', - headers: { - 'Access-Control-Allow-Origin': '*', // Allow CORS - } }) .then(response => { this.downloadInfo = response.data; @@ -146,9 +140,6 @@ export class DownloadComponent { method: 'get', url: this.developmentStore.getBaseUrl() + 'api/v1/download?fileId=' + this.fileId + '&password=' + this.filePassword, responseType: 'arraybuffer', - headers: { - 'Access-Control-Allow-Origin': '*', // Allow CORS - }, onDownloadProgress: (progressEvent) => { const endTime = new Date().getTime(); const duration = (endTime - startTime) / 1000; diff --git a/frontend/src/app/upload/upload.component.ts b/frontend/src/app/upload/upload.component.ts index 783101a..df1cce8 100644 --- a/frontend/src/app/upload/upload.component.ts +++ b/frontend/src/app/upload/upload.component.ts @@ -85,7 +85,6 @@ export class UploadComponent { const config = { headers: { 'Content-Type': 'multipart/form-data', - 'Access-Control-Allow-Origin': '*', // Allow CORS }, onUploadProgress: (progressEvent: AxiosProgressEvent) => { if (progressEvent.total) { @@ -156,7 +155,6 @@ export class UploadComponent { data: uint8View, headers: { 'Content-Type': 'application/octet-stream', - 'Access-Control-Allow-Origin': '*', // Allow CORS }, onUploadProgress: function(progressEvent) { // Optional: handle progress events for feedback