How to prevent cross-site scripting using CSP (Content security policy) in React frontend
CSP is a security standard that prevents cross-site scripting(XSS), clickjacking and other code injection attacks. Usually adding CSP to a React application is easy. However while implementing the CSP into an react application with Craco, we need to handle the inline styles. These styles come from API and as a developer, you don’t have control or you cannot modify it. In this blog, I will show you how to handle those inline styles.