-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare Cross-Origin-Resource-Policy standalone package
- Loading branch information
Showing
5 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
### Added | ||
|
||
- Added support for the `cross-origin` policy | ||
|
||
## 0.2.1 - 2020-12-22 | ||
|
||
### Fixed | ||
|
||
- Fixed incorrect example in README | ||
|
||
## 0.2.0 - 2019-07-17 | ||
|
||
### Added | ||
|
||
- Added TypeScript type definitions. See [#2](https://github.com/helmetjs/cross-origin-resource-policy/pull/2) and [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188) | ||
- Created a changelog | ||
- Added some additional package metadata: homepage, email for bug reports, and a list of supported Node versions | ||
|
||
### Changed | ||
|
||
- Excluded some files from npm package | ||
|
||
This changelog was started in version 0.2.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Cross-Origin-Resource-Policy middleware | ||
|
||
This middleware sets the `Cross-Origin-Resource-Policy` header. Read about it [in the spec](https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header). | ||
|
||
Usage: | ||
|
||
```javascript | ||
const crossOriginResourcePolicy = require("cross-origin-resource-policy"); | ||
|
||
// Sets "Cross-Origin-Resource-Policy: same-origin" | ||
app.use(crossOriginResourcePolicy({ policy: "same-origin" })); | ||
|
||
// Sets "Cross-Origin-Resource-Policy: same-site" | ||
app.use(crossOriginResourcePolicy({ policy: "same-site" })); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["index.js", "index.d.ts"] |
8 changes: 8 additions & 0 deletions
8
middlewares/cross-origin-resource-policy/package-overrides.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "cross-origin-resource-policy", | ||
"author": "Evan Hahn <[email protected]> (https://evanhahn.com)", | ||
"contributors": [], | ||
"description": "Middleware to set the Cross-Origin-Resource-Policy header", | ||
"version": "0.2.1", | ||
"keywords": ["cross-origin-resource-policy"] | ||
} |