Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: frux/csp-header
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.2
Choose a base ref
...
head repository: frux/csp-header
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 20, 2021

  1. Copy the full SHA
    d7e1412 View commit details
  2. 2.2.0

    frux committed Mar 20, 2021
    Copy the full SHA
    00e2228 View commit details

Commits on Mar 26, 2021

  1. Archivation note

    frux authored Mar 26, 2021
    Copy the full SHA
    6fc2952 View commit details
Showing with 9 additions and 2 deletions.
  1. +2 −0 README.md
  2. +1 −1 package-lock.json
  3. +1 −1 package.json
  4. +5 −0 src/constants.ts
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
[![NPM downloads](https://img.shields.io/npm/dm/csp-header.svg?style=flat)](https://www.npmjs.com/package/csp-header)
[![Dependency Status](https://img.shields.io/david/frux/csp-header.svg?style=flat)](https://david-dm.org/frux/csp-header)

## ⚠️ ARCHIVED: Repository became a part of monorepo [frux/csp](https://github.com/frux/csp) ⚠️

Content-Security-Policy header generator for Node.js.

## Install
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "csp-header",
"version": "2.1.2",
"version": "2.2.0",
"description": "Content-Security-Policy header generator",
"main": "dist/index.js",
"types": "dist/index.d.ts",
5 changes: 5 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ export const NONE = "'none'";
export const SELF = "'self'";
export const INLINE = "'unsafe-inline'";
export const EVAL = "'unsafe-eval'";
export const HASHES = "'unsafe-hashes'";
export const DATA = 'data:';
export const BLOB = 'blob:';

@@ -50,7 +51,11 @@ export const LIST_DIRECTIVES = {
'referrer': 'referrer',
'sandbox': 'sandbox',
'script-src': 'script-src',
'script-src-attr': 'script-src-attr',
'script-src-elem': 'script-src-elem',
'style-src': 'style-src',
'style-src-elem': 'style-src-elem',
'style-src-attr': 'style-src-attr',
'worker-src': 'worker-src'
};
export const STRING_DIRECTIVES = {