https://github.com/frux/csp
Monorepo for CSP-related packages
https://github.com/frux/csp
content-security-policy csp express middleware
Last synced: 3 months ago
JSON representation
Monorepo for CSP-related packages
- Host: GitHub
- URL: https://github.com/frux/csp
- Owner: frux
- Created: 2021-03-20T09:00:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-12-19T05:48:06.000Z (6 months ago)
- Last Synced: 2026-03-07T12:47:42.212Z (3 months ago)
- Topics: content-security-policy, csp, express, middleware
- Language: TypeScript
- Homepage:
- Size: 1.04 MB
- Stars: 24
- Watchers: 1
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# CSP
Hear is a couple of libraries to work with [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) in your JavaScript application.
---
## [csp-header](https://github.com/frux/csp/tree/master/packages/csp-header#readme)
[](https://www.npmjs.com/package/csp-header)
[](https://www.npmjs.com/package/csp-header)
Zero-dependency library for generating CSP policies. It can be used for both HTTP header and `` element. Supports presets for organizing and managing your policies.
---
## [express-csp-header](https://github.com/frux/csp/tree/master/packages/express-csp-header#readme)
[](https://www.npmjs.com/package/express-csp-header)
[](https://www.npmjs.com/package/express-csp-header)
This is a `csp-header` wrapped in a middleware with auto-tld support and nonce generation. It's ready to use in your Express application.