mirror of
https://github.com/abrendan/MicDropMessages.git
synced 2025-08-25 05:52:02 +02:00
Initial commit
This commit is contained in:
11
node_modules/hide-powered-by/CHANGELOG.md
generated
vendored
Normal file
11
node_modules/hide-powered-by/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 1.1.0 - 2019-05-26
|
||||
### Added
|
||||
- Added TypeScript type definitions. See [#2](https://github.com/helmetjs/hide-powered-by/issues/2) and [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188)
|
||||
- Created a changelog
|
||||
|
||||
### Changed
|
||||
- Excluded some files from npm package
|
||||
|
||||
Changes in versions 1.0.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).
|
21
node_modules/hide-powered-by/LICENSE
generated
vendored
Normal file
21
node_modules/hide-powered-by/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2019 Evan Hahn, Adam Baldwin
|
||||
|
||||
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.
|
24
node_modules/hide-powered-by/README.md
generated
vendored
Normal file
24
node_modules/hide-powered-by/README.md
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
Hide X-Powered-By
|
||||
=================
|
||||
[](https://travis-ci.org/helmetjs/hide-powered-by)
|
||||
|
||||
Simple middleware to remove the `X-Powered-By` HTTP header if it's set.
|
||||
|
||||
Hackers can exploit known vulnerabilities in Express/Node if they see that your site is powered by Express (or whichever framework you use). For example, `X-Powered-By: Express` is sent in every HTTP request coming from Express, by default. This won't provide much security benefit ([as discussed here](https://github.com/expressjs/express/pull/2813#issuecomment-159270428)), but might help a tiny bit. It will also improve performance by reducing the number of bytes sent.
|
||||
|
||||
```javascript
|
||||
const hidePoweredBy = require('hide-powered-by')
|
||||
app.use(hidePoweredBy())
|
||||
```
|
||||
|
||||
You can also explicitly set the header to something else, if you want. This could throw people off:
|
||||
|
||||
```javascript
|
||||
app.use(hidePoweredBy({ setTo: 'PHP 4.2.0' }))
|
||||
```
|
||||
|
||||
Note: if you're using Express, you don't need this middleware and can just do this:
|
||||
|
||||
```javascript
|
||||
app.disable('x-powered-by')
|
||||
```
|
7
node_modules/hide-powered-by/dist/index.d.ts
generated
vendored
Normal file
7
node_modules/hide-powered-by/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from 'http';
|
||||
interface HidePoweredByOptions {
|
||||
setTo?: string;
|
||||
}
|
||||
declare const _default: (options?: HidePoweredByOptions | undefined) => (_req: IncomingMessage, res: ServerResponse, next: () => void) => void;
|
||||
export = _default;
|
16
node_modules/hide-powered-by/dist/index.js
generated
vendored
Normal file
16
node_modules/hide-powered-by/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
module.exports = function hidePoweredBy(options) {
|
||||
var _a = (options || {}).setTo, setTo = _a === void 0 ? null : _a;
|
||||
if (setTo) {
|
||||
return function hidePoweredBy(_req, res, next) {
|
||||
res.setHeader('X-Powered-By', setTo);
|
||||
next();
|
||||
};
|
||||
}
|
||||
else {
|
||||
return function hidePoweredBy(_req, res, next) {
|
||||
res.removeHeader('X-Powered-By');
|
||||
next();
|
||||
};
|
||||
}
|
||||
};
|
94
node_modules/hide-powered-by/package.json
generated
vendored
Normal file
94
node_modules/hide-powered-by/package.json
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"_from": "hide-powered-by@1.1.0",
|
||||
"_id": "hide-powered-by@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Io1zA2yOA1YJslkr+AJlWSf2yWFkKjvkcL9Ni1XSUqnGLr/qRQe2UI3Cn/J9MsJht7yEVCe0SscY1HgVMujbgg==",
|
||||
"_location": "/hide-powered-by",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "hide-powered-by@1.1.0",
|
||||
"name": "hide-powered-by",
|
||||
"escapedName": "hide-powered-by",
|
||||
"rawSpec": "1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/helmet"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/hide-powered-by/-/hide-powered-by-1.1.0.tgz",
|
||||
"_shasum": "be3ea9cab4bdb16f8744be873755ca663383fa7a",
|
||||
"_spec": "hide-powered-by@1.1.0",
|
||||
"_where": "/home/runner/Socketio-Chat-Template/node_modules/helmet",
|
||||
"author": {
|
||||
"name": "Adam Baldwin",
|
||||
"email": "adam@npmjs.com",
|
||||
"url": "https://evilpacket.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/helmetjs/hide-powered-by/issues",
|
||||
"email": "me@evanhahn.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Evan Hahn",
|
||||
"email": "me@evanhahn.com",
|
||||
"url": "https://evanhahn.com"
|
||||
}
|
||||
],
|
||||
"deprecated": false,
|
||||
"description": "Middleware to remove the X-Powered-By header",
|
||||
"devDependencies": {
|
||||
"@types/connect": "^3.4.32",
|
||||
"@types/jest": "^24.0.12",
|
||||
"@types/supertest": "^2.0.7",
|
||||
"@typescript-eslint/eslint-plugin": "^1.7.0",
|
||||
"@typescript-eslint/parser": "^1.7.0",
|
||||
"connect": "^3.7.0",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-helmet": "^0.2.0",
|
||||
"jest": "^24.7.1",
|
||||
"supertest": "^4.0.2",
|
||||
"ts-jest": "^24.0.2",
|
||||
"typescript": "^3.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"dist/index.js",
|
||||
"dist/index.d.ts"
|
||||
],
|
||||
"homepage": "https://helmetjs.github.io/docs/hide-powered-by/",
|
||||
"keywords": [
|
||||
"helmet",
|
||||
"security",
|
||||
"express",
|
||||
"connect",
|
||||
"x-powered-by",
|
||||
"powered-by"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"name": "hide-powered-by",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/helmetjs/hide-powered-by.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.1.0"
|
||||
}
|
Reference in New Issue
Block a user