content-security-policy-builder

WebJar for content-security-policy-builder

License

License

MIT
Categories

Categories

Security
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

content-security-policy-builder
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

content-security-policy-builder
WebJar for content-security-policy-builder
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/helmetjs/content-security-policy-builder

Download content-security-policy-builder

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/content-security-policy-builder/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>content-security-policy-builder</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/content-security-policy-builder/
implementation 'org.webjars.npm:content-security-policy-builder:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/content-security-policy-builder/
implementation ("org.webjars.npm:content-security-policy-builder:2.0.0")
'org.webjars.npm:content-security-policy-builder:jar:2.0.0'
<dependency org="org.webjars.npm" name="content-security-policy-builder" rev="2.0.0">
  <artifact name="content-security-policy-builder" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='content-security-policy-builder', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "content-security-policy-builder" % "2.0.0"
[org.webjars.npm/content-security-policy-builder "2.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Content Security Policy builder

Build Status

Take an object and turn it into a Content Security Policy string. Useful for building Content Security Policy libraries.

It can handle a lot of things you can you throw at it; camelCased or dash-separated directives, arrays or strings, et cetera.

Usage:

const builder = require('content-security-policy-builder')

// default-src 'self' default.com; script-src scripts.com; whatever-src something; object-src
builder({
  directives: {
    defaultSrc: ["'self'", 'default.com'],
    scriptSrc: 'scripts.com',
    'whatever-src': 'something',
    objectSrc: true
  }
})

This module is considered "complete". I expect to continue maintenance if needed, but I don't plan to add features or make breaking changes.

org.webjars.npm

Helmet

Express.js security with HTTP headers

Versions

Version
2.0.0