Skip to main content

Posts

Showing posts with the label Angular Security Principles - Angular Security!

Angular Security Principles - Angular Security!

Security Principles For Angular's Regular Web Applications - 1.      You should avoid direct use of the DOM APIs. 2.      You should enable Content Security Policy (CSP) and configure your web server to return appropriate CSP HTTP headers. 3.      You should Use the offline template compiler. 4.      You should Use Server Side XSS protection. 5.      You should Use DOM Sanitizer. 6.      You should Preventing CSRF or XSRF attacks. Example – export const BROWSER_SANITIZATION_PROVIDERS: Array < any > = [   { provide : Sanitizer , useExisting : DomSanitizer },   { provide : DomSanitizer , useClass : DomSanitizerImpl }, ]; @ NgModule ({   providers : [     BROWSER_SANITIZATION_PROVIDERS     ...   ],   exports : [ CommonModule , ApplicationModule ] }) export class B...