mirror of
https://github.com/abrendan/MicDropMessages.git
synced 2025-08-25 05:52:02 +02:00
Initial commit
This commit is contained in:
12
node_modules/dns-prefetch-control/CHANGELOG.md
generated
vendored
Normal file
12
node_modules/dns-prefetch-control/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
### Added
|
||||
- Added TypeScript type definitions. See [#2](https://github.com/helmetjs/dns-prefetch-control/pull/2) and [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188)
|
||||
- Created a changelog
|
||||
|
||||
### Changed
|
||||
- Update some package metadata
|
||||
- Excluded some files from npm package
|
||||
|
||||
Changes in versions 0.1.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).
|
21
node_modules/dns-prefetch-control/LICENSE
generated
vendored
Normal file
21
node_modules/dns-prefetch-control/LICENSE
generated
vendored
Normal 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.
|
20
node_modules/dns-prefetch-control/README.md
generated
vendored
Normal file
20
node_modules/dns-prefetch-control/README.md
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
DNS prefetch control header for Express
|
||||
=======================================
|
||||
[](https://travis-ci.org/helmetjs/dns-prefetch-control)
|
||||
|
||||
This middleware lets you set the `X-DNS-Prefetch-Control` to control browsers' DNS prefetching. Read more about it [on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Controlling_DNS_prefetching) and [on Chromium's docs](https://dev.chromium.org/developers/design-documents/dns-prefetching).
|
||||
|
||||
Usage:
|
||||
|
||||
```js
|
||||
const dnsPrefetchControl = require('dns-prefetch-control')
|
||||
|
||||
// Set X-DNS-Prefetch-Control: off
|
||||
app.use(dnsPrefetchControl())
|
||||
|
||||
// Set X-DNS-Prefetch-Control: off
|
||||
app.use(dnsPrefetchControl({ allow: false }))
|
||||
|
||||
// Set X-DNS-Prefetch-Control: on
|
||||
app.use(dnsPrefetchControl({ allow: true }))
|
||||
```
|
7
node_modules/dns-prefetch-control/dist/index.d.ts
generated
vendored
Normal file
7
node_modules/dns-prefetch-control/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from 'http';
|
||||
interface DnsPrefetchControlOptions {
|
||||
allow?: boolean;
|
||||
}
|
||||
declare const _default: (options?: DnsPrefetchControlOptions | undefined) => (_req: IncomingMessage, res: ServerResponse, next: () => void) => void;
|
||||
export = _default;
|
16
node_modules/dns-prefetch-control/dist/index.js
generated
vendored
Normal file
16
node_modules/dns-prefetch-control/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
function getHeaderValueFromOptions(options) {
|
||||
if (options && options.allow) {
|
||||
return 'on';
|
||||
}
|
||||
else {
|
||||
return 'off';
|
||||
}
|
||||
}
|
||||
module.exports = function dnsPrefetchControl(options) {
|
||||
var headerValue = getHeaderValueFromOptions(options);
|
||||
return function dnsPrefetchControl(_req, res, next) {
|
||||
res.setHeader('X-DNS-Prefetch-Control', headerValue);
|
||||
next();
|
||||
};
|
||||
};
|
88
node_modules/dns-prefetch-control/package.json
generated
vendored
Normal file
88
node_modules/dns-prefetch-control/package.json
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"_from": "dns-prefetch-control@0.2.0",
|
||||
"_id": "dns-prefetch-control@0.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-hvSnros73+qyZXhHFjx2CMLwoj3Fe7eR9EJsFsqmcI1bB2OBWL/+0YzaEaKssCHnj/6crawNnUyw74Gm2EKe+Q==",
|
||||
"_location": "/dns-prefetch-control",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "dns-prefetch-control@0.2.0",
|
||||
"name": "dns-prefetch-control",
|
||||
"escapedName": "dns-prefetch-control",
|
||||
"rawSpec": "0.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/helmet"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/dns-prefetch-control/-/dns-prefetch-control-0.2.0.tgz",
|
||||
"_shasum": "73988161841f3dcc81f47686d539a2c702c88624",
|
||||
"_spec": "dns-prefetch-control@0.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/dns-prefetch-control/issues",
|
||||
"email": "me@evanhahn.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Middleware to set X-DNS-Prefetch-Control header.",
|
||||
"devDependencies": {
|
||||
"@types/connect": "^3.4.32",
|
||||
"@types/jest": "^24.0.12",
|
||||
"@types/supertest": "^2.0.7",
|
||||
"@typescript-eslint/eslint-plugin": "^1.8.0",
|
||||
"@typescript-eslint/parser": "^1.8.0",
|
||||
"connect": "^3.6.6",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-helmet": "^0.2.0",
|
||||
"jest": "^24.8.0",
|
||||
"supertest": "^4.0.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/dns-prefetch-control",
|
||||
"keywords": [
|
||||
"helmet",
|
||||
"security",
|
||||
"express",
|
||||
"connect",
|
||||
"x-dns-prefetch-control",
|
||||
"dns",
|
||||
"prefetch"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"name": "dns-prefetch-control",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/helmetjs/dns-prefetch-control.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": "0.2.0"
|
||||
}
|
Reference in New Issue
Block a user