3

I'm working on my first .net core web api project, and struggling with anti XSS input sanitization. AntiXSS library isn't available and there's not a lot of informations about managing XSS+Web API+Core.

So i have to ask You: what is best way now to secure against this kind of attacks? Custom data annotation validators? Some middleware class?

Mateusz
  • 31
  • 2
  • There are a number of NuGet packages which add asp net core middleware items to take care of this. One which I've made is called [OwaspHeaders.Core](https://github.com/gaprogman/owaspheaders.core/), but there are a _lot_ of them to choose from. – Jamie Taylor May 09 '19 at 13:36
  • Does this answer your question? [How to protect against XSS in ASP.NET Core?](https://stackoverflow.com/questions/52239262/how-to-protect-against-xss-in-asp-net-core) – Michael Freidgeim Apr 21 '21 at 14:58

0 Answers0