Angular 4 handle XSS CSRF Attacks

Angular 4 Apps Prevent this Attack

How Angular Apps Prevent this Attack?
To block Cross-Site-Scripting attacks, we must prevent the malicious code from application DOM.

When a value is inserted into the DOM from a template using the property, style, class binding, attribute, or interpolation, Angular sanitizes and escapes untrusted values.

Stayed Informed – Angular 4 docs and Angular 5 docs

Example –
@NgModule({
  providers: [
    BROWSER_SANITIZATION_PROVIDERS
    ...
  ],
  exports: [CommonModule, ApplicationModule]
})

I hope you are enjoying with this post! Please share with you friends. Thank you so much!
ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.