CSPNet
CSPNet, or Content Security Policy Network, is a web security standard introduced to prevent a variety of attacks, including Cross-Site Scripting (XSS) and data injection attacks. It allows web developers to control resources the user agent is allowed to load for a given page. With CSP, a web application can whitelist sources of executable scripts, thus preventing the browser from loading malicious scripts.
The policy is defined using HTTP headers. It can specify valid sources for content types like scripts,
CSPNet can be enforced in two modes: report-only and enforce. In report-only mode, the browser will not
CSPNet also supports a feature called "nonce" and "hash" to allow inline scripts and styles. Nonce is
CSPNet is supported by all major browsers and is considered a best practice for web security. It