Getting cors error only when calling image url via http request but all apis are working so well other than this.
Access to XMLHttpRequest at 'https://*********/diamond-grey.png' from origin 'http://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
httpcall.ts
`let header = new Headers();
header.set('Access-Control-Allow-Origin', '*');
let options = new RequestOptions({ headers: header});
await this.http.get(url, {
responseType: ResponseContentType.Blob,
})
.toPromise()
.then((res: any) => {
let blob = new Blob([res._body], {
type: res.headers.get("Content-Type")
});
let urlCreator = window.URL;
return this.domSanitizer.bypassSecurityTrustUrl(
urlCreator.createObjectURL(blob));
});`