Removed allow cors
This commit is contained in:
parent
9ca76948df
commit
374d2661c0
@ -101,9 +101,6 @@ export class DownloadComponent {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
url: this.developmentStore.getBaseUrl() + 'api/v1/speed-test',
|
url: this.developmentStore.getBaseUrl() + 'api/v1/speed-test',
|
||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
headers: {
|
|
||||||
'Access-Control-Allow-Origin': '*', // Allow CORS
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
const end = new Date().getTime(); // End timer
|
const end = new Date().getTime(); // End timer
|
||||||
@ -124,9 +121,6 @@ export class DownloadComponent {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
url: this.developmentStore.getBaseUrl() + 'api/v1/download-info?fileId=' + this.fileId,
|
url: this.developmentStore.getBaseUrl() + 'api/v1/download-info?fileId=' + this.fileId,
|
||||||
responseType: 'json',
|
responseType: 'json',
|
||||||
headers: {
|
|
||||||
'Access-Control-Allow-Origin': '*', // Allow CORS
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.downloadInfo = response.data;
|
this.downloadInfo = response.data;
|
||||||
@ -146,9 +140,6 @@ export class DownloadComponent {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
url: this.developmentStore.getBaseUrl() + 'api/v1/download?fileId=' + this.fileId + '&password=' + this.filePassword,
|
url: this.developmentStore.getBaseUrl() + 'api/v1/download?fileId=' + this.fileId + '&password=' + this.filePassword,
|
||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
headers: {
|
|
||||||
'Access-Control-Allow-Origin': '*', // Allow CORS
|
|
||||||
},
|
|
||||||
onDownloadProgress: (progressEvent) => {
|
onDownloadProgress: (progressEvent) => {
|
||||||
const endTime = new Date().getTime();
|
const endTime = new Date().getTime();
|
||||||
const duration = (endTime - startTime) / 1000;
|
const duration = (endTime - startTime) / 1000;
|
||||||
|
@ -85,7 +85,6 @@ export class UploadComponent {
|
|||||||
const config = {
|
const config = {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data',
|
'Content-Type': 'multipart/form-data',
|
||||||
'Access-Control-Allow-Origin': '*', // Allow CORS
|
|
||||||
},
|
},
|
||||||
onUploadProgress: (progressEvent: AxiosProgressEvent) => {
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => {
|
||||||
if (progressEvent.total) {
|
if (progressEvent.total) {
|
||||||
@ -156,7 +155,6 @@ export class UploadComponent {
|
|||||||
data: uint8View,
|
data: uint8View,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/octet-stream',
|
'Content-Type': 'application/octet-stream',
|
||||||
'Access-Control-Allow-Origin': '*', // Allow CORS
|
|
||||||
},
|
},
|
||||||
onUploadProgress: function(progressEvent) {
|
onUploadProgress: function(progressEvent) {
|
||||||
// Optional: handle progress events for feedback
|
// Optional: handle progress events for feedback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user