Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enhance CSP in
webpack.config.js
for stricter security polici…
…es (#78) - **Changes**: - Refined the `CspHtmlWebpackPlugin` configuration: - Added `base-uri` directive with `'self'`. - Updated `script-src` to include `'strict-dynamic'` and `'unsafe-inline'` for better compatibility with dynamic scripts. - Enabled `'unsafe-inline'` for `style-src` to accommodate inline styles. - Explicitly disabled `object-src` with `'none'`. - Added `require-trusted-types-for` to enforce Trusted Types for scripts. - Commented out `StrictCspHtmlWebpackPlugin` for potential future use with `enableTrustedTypes`. - **Purpose**: - Strengthen security by enhancing Content Security Policy (CSP) directives. - **Impact**: - Reduces vulnerabilities to XSS and related attacks while allowing necessary script and style flexibility.
- Loading branch information