JSPM

  • Created
  • Published
  • Downloads 20438
  • Score
    100M100P100Q138351F
  • License Apache-2.0

Protect your Response with secure headers

Package Exports

  • nosecone
  • nosecone/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nosecone) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Arcjet Logo

nosecone

npm badge

Protect your Response with secure headers.

What is this?

Nosecone makes it easy to add and configure security headers. This package exists so that you can secure your server even if you do not use Arcjet.

When should I use this?

You can use this package with or without Arcjet to protect your server. You can use @nosecone/next or @nosecone/sveltekit if you are using those frameworks.

Install

This package is ESM only. Install with npm in Node.js:

npm install nosecone

Example

import nosecone from "nosecone";

const response = new Response(null, { headers: nosecone() });

console.log(response);
// => Response {
//   status: 200,
//   statusText: '',
//   headers: Headers {
//     'content-security-policy': "base-uri 'none'; …",
//     …
//   }
//   …
// }

License

Apache License, Version 2.0 © Arcjet Labs, Inc.

Derivative work based on josh-hemphill/csp-typed-directives licensed under MIT © Joshua Hemphill and Tecnico Corporation. Our work picks the couple types that we need. It is also based on helmetjs/helmet licensed under MIT © Evan Hahn and Adam Baldwin. We were inspired by their defaults.