Getting XSS vulnerabilities while calling the API for fetching the data. So trying to add DOMSANITIZER
, but its failing. Tried below code, please suggest me the solution.
this.http.get(this.domSanitizer.bypassSecurityTrustUrl(dataUrl),{headers:headers}).subscribe(response => {
this.persons = response.data.map(x=>({...x,check:false,test:x.firstName}));
this.dtTrigger.next();
});
I have also save it and you can go there to check it. https://stackblitz.com/edit/column-names-as-tooltip-wcw1f7?file=app/app.component.ts