Comparing version 0.3.0 to 1.0.0
# Changelog | ||
## 1.0.0 - 2020-08-02 | ||
### Changed | ||
- If `maxAge` is `undefined`, it will be set to `0` | ||
- If `maxAge` is not an integer, it will be rounded down | ||
### Removed | ||
- Dropped support for old Node versions. Node 10+ is now required | ||
## 0.3.0 - 2019-09-01 | ||
### Changed | ||
- Dropped support for Node <8 | ||
@@ -10,3 +23,5 @@ - You must now pass a positive integer for `maxAge` (instead of any positive number) | ||
## 0.2.0 - 2019-05-04 | ||
### Added | ||
- TypeScript type definitions. See [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188) | ||
@@ -16,4 +31,5 @@ - Additional package metadata (bugs, homepage, etc) | ||
### Changed | ||
- Updated documentation | ||
Changes in versions 0.1.1 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md). |
{ | ||
"name": "expect-ct", | ||
"author": "Evan Hahn <me@evanhahn.com> (https://evanhahn.com)", | ||
"description": "Middleware to set the Expect-CT header", | ||
"version": "0.3.0", | ||
"contributors": [], | ||
"license": "MIT", | ||
"keywords": [ | ||
"helmet", | ||
"security", | ||
"express", | ||
"connect", | ||
"expect-ct" | ||
], | ||
"homepage": "https://helmetjs.github.io/docs/expect-ct/", | ||
"homepage": "https://helmetjs.github.io/", | ||
"bugs": { | ||
"url": "https://github.com/helmetjs/helmet/issues", | ||
"email": "me@evanhahn.com" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/helmetjs/expect-ct.git" | ||
"url": "git://github.com/helmetjs/helmet.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/helmetjs/expect-ct/issues", | ||
"email": "me@evanhahn.com" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
"node": ">=10.0.0" | ||
}, | ||
"main": "./dist/index.js", | ||
"typings": "./dist/index.d.ts", | ||
"files": [ | ||
@@ -32,28 +21,15 @@ "CHANGELOG.md", | ||
"README.md", | ||
"dist/index.js", | ||
"dist/index.d.ts" | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"scripts": { | ||
"pretest": "npm run lint", | ||
"prepublishOnly": "npm run build", | ||
"lint": "eslint --fix '**/*.ts'", | ||
"test": "jest --config test/jest-config.json", | ||
"clean": "rm -rf dist", | ||
"build": "npm run clean && tsc" | ||
}, | ||
"devDependencies": { | ||
"@types/connect": "^3.4.32", | ||
"@types/jest": "^24.0.18", | ||
"@types/supertest": "^2.0.8", | ||
"@typescript-eslint/eslint-plugin": "^2.0.0", | ||
"@typescript-eslint/parser": "^2.0.0", | ||
"connect": "^3.7.0", | ||
"eslint": "^6.3.0", | ||
"eslint-config-helmet": "^0.2.0", | ||
"jest": "^24.9.0", | ||
"supertest": "^4.0.2", | ||
"ts-jest": "^24.0.2", | ||
"typescript": "^3.6.2" | ||
}, | ||
"dependencies": {} | ||
} | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"name": "expect-ct", | ||
"description": "Middleware to set the Expect-CT header", | ||
"version": "1.0.0", | ||
"keywords": [ | ||
"express", | ||
"security", | ||
"expect-ct" | ||
] | ||
} |
@@ -1,4 +0,2 @@ | ||
Expect-CT | ||
========= | ||
[![Build Status](https://travis-ci.org/helmetjs/expect-ct.svg?branch=master)](https://travis-ci.org/helmetjs/expect-ct) | ||
# Expect-CT middleware | ||
@@ -10,19 +8,23 @@ The `Expect-CT` HTTP header tells browsers to expect Certificate Transparency. For more, see [this blog post](https://scotthelme.co.uk/a-new-security-header-expect-ct/) and the [article on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect-CT). | ||
```javascript | ||
const expectCt = require('expect-ct') | ||
const expectCt = require("expect-ct"); | ||
// Sets Expect-CT: max-age=123 | ||
app.use(expectCt({ maxAge: 123 })) | ||
app.use(expectCt({ maxAge: 123 })); | ||
// Sets Expect-CT: enforce, max-age=123 | ||
app.use(expectCt({ | ||
enforce: true, | ||
maxAge: 123 | ||
})) | ||
app.use( | ||
expectCt({ | ||
enforce: true, | ||
maxAge: 123, | ||
}) | ||
); | ||
// Sets Expect-CT: enforce, max-age=30, report-uri="https://example.com/report" | ||
app.use(expectCt({ | ||
enforce: true, | ||
maxAge: 30, | ||
reportUri: 'https://example.com/report' | ||
})) | ||
app.use( | ||
expectCt({ | ||
enforce: true, | ||
maxAge: 30, | ||
reportUri: "https://example.com/report", | ||
}) | ||
); | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
30
4757