vite-plugin-node-csp

0.1.3 • Public • Published

Vite Plugin CSP Node

Vite Plugin for adding a Content Security Policy to your Vite application using the Node.js runtime.

Documentation

See docs here.

Features

  • ✨ Automatically calculates Subresource Integrity (SRI) hashes of JavaScript and CSS assets and adds them to the CSP.
  • 📚 Automatically detects and handles Google Fonts.
  • 🏎 Single dependency. Uses@miniflare/html-rewriter, a WASM build of Cloudflare's HTMLRewriter for parsing HTML.

Installation

npm i -D vite-plugin-node-csp

Package Sidebar

Install

npm i vite-plugin-node-csp

Weekly Downloads

101

Version

0.1.3

License

MIT

Unpacked Size

18.1 kB

Total Files

4

Last publish

Collaborators

  • maccuaa