Initial commit

This commit is contained in:
abrendan
2023-11-30 14:15:19 +00:00
commit e4599df811
5457 changed files with 500139 additions and 0 deletions

12
node_modules/referrer-policy/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,12 @@
# Changelog
## 1.2.0 - 2019-05-03
### Added
- Allow multiple values to be set. See [#7](https://github.com/helmetjs/referrer-policy/issues/7)
- Added TypeScript type definitions. See [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188)
- Created a changelog
### Changed
- Updated documentation
Changes in versions 1.1.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).

21
node_modules/referrer-policy/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016-2019 Evan Hahn
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

22
node_modules/referrer-policy/README.md generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Referrer Policy
===============
[![Build Status](https://travis-ci.org/helmetjs/referrer-policy.svg?branch=master)](https://travis-ci.org/helmetjs/referrer-policy)
The [Referer HTTP header](https://en.wikipedia.org/wiki/HTTP_referer) is typically set by web browsers to tell the server where it's coming from. For example, if you click a link on *example.com/index.html* that takes you to *wikipedia.org*, Wikipedia's servers will see `Referer: example.com`. This can have privacy implications—websites can see where you are coming from. The new [`Referrer-Policy` HTTP header](https://www.w3.org/TR/referrer-policy/#referrer-policy-header) lets authors control how browsers set the Referer header.
[Read the spec](https://www.w3.org/TR/referrer-policy/#referrer-policies) to see the options you can provide.
Usage:
```javascript
const referrerPolicy = require('referrer-policy')
app.use(referrerPolicy({ policy: 'same-origin' }))
// Referrer-Policy: same-origin
app.use(referrerPolicy({ policy: 'unsafe-url' }))
// Referrer-Policy: unsafe-url
app.use(referrerPolicy())
// Referrer-Policy: no-referrer
```

7
node_modules/referrer-policy/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
/// <reference types="node" />
import { IncomingMessage, ServerResponse } from 'http';
interface ReferrerPolicyOptions {
policy?: string | string[];
}
declare const _default: (options?: ReferrerPolicyOptions | undefined) => (_req: IncomingMessage, res: ServerResponse, next: () => void) => void;
export = _default;

53
node_modules/referrer-policy/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
"use strict";
function getHeaderValueFromOptions(options) {
var DEFAULT_POLICY = 'no-referrer';
var ALLOWED_POLICIES = [
'no-referrer',
'no-referrer-when-downgrade',
'same-origin',
'origin',
'strict-origin',
'origin-when-cross-origin',
'strict-origin-when-cross-origin',
'unsafe-url',
''
];
options = options || {};
var policyOption;
if ('policy' in options) {
policyOption = options.policy;
}
else {
policyOption = DEFAULT_POLICY;
}
var policies = Array.isArray(policyOption) ? policyOption : [policyOption];
if (policies.length === 0) {
throw new Error('At least one policy must be supplied.');
}
var policiesSeen = new Set();
policies.forEach(function (policy) {
if ((typeof policy !== 'string') || (ALLOWED_POLICIES.indexOf(policy) === -1)) {
var allowedPoliciesErrorList = ALLOWED_POLICIES.map(function (policy) {
if (policy.length) {
return "\"" + policy + "\"";
}
else {
return 'and the empty string';
}
}).join(', ');
throw new Error("\"" + policy + "\" is not a valid policy. Allowed policies: " + allowedPoliciesErrorList + ".");
}
if (policiesSeen.has(policy)) {
throw new Error("\"" + policy + "\" specified more than once. No duplicates are allowed.");
}
policiesSeen.add(policy);
});
return policies.join(',');
}
module.exports = function referrerPolicy(options) {
var headerValue = getHeaderValueFromOptions(options);
return function referrerPolicy(_req, res, next) {
res.setHeader('Referrer-Policy', headerValue);
next();
};
};

86
node_modules/referrer-policy/package.json generated vendored Normal file
View File

@@ -0,0 +1,86 @@
{
"_from": "referrer-policy@1.2.0",
"_id": "referrer-policy@1.2.0",
"_inBundle": false,
"_integrity": "sha512-LgQJIuS6nAy1Jd88DCQRemyE3mS+ispwlqMk3b0yjZ257fI1v9c+/p6SD5gP5FGyXUIgrNOAfmyioHwZtYv2VA==",
"_location": "/referrer-policy",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "referrer-policy@1.2.0",
"name": "referrer-policy",
"escapedName": "referrer-policy",
"rawSpec": "1.2.0",
"saveSpec": null,
"fetchSpec": "1.2.0"
},
"_requiredBy": [
"/helmet"
],
"_resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.2.0.tgz",
"_shasum": "b99cfb8b57090dc454895ef897a4cc35ef67a98e",
"_spec": "referrer-policy@1.2.0",
"_where": "/home/runner/Socketio-Chat-Template/node_modules/helmet",
"author": {
"name": "Evan Hahn",
"email": "me@evanhahn.com",
"url": "https://evanhahn.com"
},
"bugs": {
"url": "https://github.com/helmetjs/referrer-policy/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Middleware to set the Referrer-Policy HTTP header",
"devDependencies": {
"@types/connect": "^3.4.32",
"@types/jest": "^24.0.11",
"@types/supertest": "^2.0.7",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^1.7.0",
"connect": "^3.6.6",
"eslint": "^5.16.0",
"jest": "^24.7.1",
"supertest": "^3.4.2",
"ts-jest": "^24.0.2",
"typescript": "^3.4.5"
},
"engines": {
"node": ">=4.0.0"
},
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"dist/index.js",
"dist/index.d.ts"
],
"homepage": "https://helmetjs.github.io/docs/referrer-policy/",
"keywords": [
"helmet",
"security",
"express",
"connect",
"referer",
"referrer",
"privacy"
],
"license": "MIT",
"main": "./dist/index.js",
"name": "referrer-policy",
"repository": {
"type": "git",
"url": "git://github.com/helmetjs/referrer-policy.git"
},
"scripts": {
"build": "npm run clean && tsc",
"clean": "rm -rf dist",
"lint": "eslint --fix '**/*.ts'",
"prepublishOnly": "npm run build",
"pretest": "npm run lint",
"test": "jest --config test/jest-config.json"
},
"typings": "./dist/index.d.ts",
"version": "1.2.0"
}