forcedomain
Advanced tools
Comparing version 2.0.1 to 2.1.0
{ | ||
"name": "forcedomain", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "forcedomain is a middleware for Connect and Express that redirects any requests to a default domain.", | ||
@@ -47,12 +47,14 @@ "contributors": [ | ||
], | ||
"main": "lib/forceDomain.js", | ||
"main": "build/lib/forceDomain.js", | ||
"types": "build/lib/forceDomain.d.ts", | ||
"dependencies": { | ||
"lodash": "4.17.20" | ||
"@types/express": "4.17.8", | ||
"express": "4.17.1" | ||
}, | ||
"devDependencies": { | ||
"@types/supertest": "2.0.10", | ||
"assertthat": "5.2.1", | ||
"cases": "1.0.0", | ||
"express": "4.17.1", | ||
"roboter": "11.2.25", | ||
"supertest": "4.0.2" | ||
"roboter": "11.3.14", | ||
"semantic-release-configuration": "1.0.21", | ||
"supertest": "5.0.0" | ||
}, | ||
@@ -59,0 +61,0 @@ "repository": { |
@@ -5,2 +5,12 @@ # forcedomain | ||
## Status | ||
| Category | Status | | ||
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| Version | [![npm](https://img.shields.io/npm/v/forcedomain)](https://www.npmjs.com/package/forcedomain) | | ||
| Dependencies | ![David](https://img.shields.io/david/thenativeweb/forcedomain) | | ||
| Dev dependencies | ![David](https://img.shields.io/david/dev/thenativeweb/forcedomain) | | ||
| Build | ![GitHub Actions](https://github.com/thenativeweb/forcedomain/workflows/Release/badge.svg?branch=master) | | ||
| License | ![GitHub](https://img.shields.io/github/license/thenativeweb/forcedomain) | | ||
## Installation | ||
@@ -14,10 +24,16 @@ | ||
The first thing you need to do is to integrate forcedomain into your application. For that add a reference to the `forcedomain` module. | ||
The first thing you need to do is to integrate forcedomain into your application. For that add a reference to the `forcedomain` module: | ||
```javascript | ||
const forceDomain = require('forcedomain'); | ||
const { forceDomain } = require('forcedomain'); | ||
``` | ||
If you now want to redirect your requests to a specific host, include the middleware and configure it accordingly. | ||
If you use TypeScript, use the following code instead: | ||
```typescript | ||
import { forcedomain } from 'forcedomain'; | ||
``` | ||
If you now want to redirect your requests to a specific host, include the middleware and configure it accordingly: | ||
```javascript | ||
@@ -29,3 +45,3 @@ app.use(forceDomain({ | ||
Additionally, you can also specify a port and a target protocol. | ||
Additionally, you can also specify a port and a target protocol: | ||
@@ -42,3 +58,3 @@ ```javascript | ||
If you want to use a `temporary` redirect instead, specify it as redirection type. | ||
If you want to use a `temporary` redirect instead, specify it as redirection type: | ||
@@ -52,3 +68,3 @@ ```javascript | ||
You can use `excludeRule` to disable redirect based on a regular expression. | ||
You can use `excludeRule` to disable redirect based on a regular expression: | ||
@@ -68,10 +84,12 @@ ```javascript | ||
server { | ||
// ... | ||
``` | ||
server { | ||
// ... | ||
location / { | ||
proxy_pass http://localhost:3000; | ||
proxy_set_header Host $http_host; | ||
} | ||
} | ||
location / { | ||
proxy_pass http://localhost:3000; | ||
proxy_set_header Host $http_host; | ||
} | ||
} | ||
``` | ||
@@ -85,12 +103,1 @@ ## Running the build | ||
``` | ||
## License | ||
The MIT License (MIT) | ||
Copyright (c) 2013-2019 the native web. | ||
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. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12881
25
195
97
2
2
+ Added@types/express@4.17.8
+ Addedexpress@4.17.1
+ Added@types/body-parser@1.19.5(transitive)
+ Added@types/connect@3.4.38(transitive)
+ Added@types/express@4.17.8(transitive)
+ Added@types/express-serve-static-core@5.0.6(transitive)
+ Added@types/http-errors@2.0.4(transitive)
+ Added@types/mime@1.3.5(transitive)
+ Added@types/node@22.13.2(transitive)
+ Added@types/qs@6.9.18(transitive)
+ Added@types/range-parser@1.2.7(transitive)
+ Added@types/send@0.17.4(transitive)
+ Added@types/serve-static@1.15.7(transitive)
+ Addedaccepts@1.3.8(transitive)
+ Addedarray-flatten@1.1.1(transitive)
+ Addedbody-parser@1.19.0(transitive)
+ Addedbytes@3.1.0(transitive)
+ Addedcontent-disposition@0.5.3(transitive)
+ Addedcontent-type@1.0.5(transitive)
+ Addedcookie@0.4.0(transitive)
+ Addedcookie-signature@1.0.6(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddepd@1.1.2(transitive)
+ Addeddestroy@1.0.4(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedencodeurl@1.0.2(transitive)
+ Addedescape-html@1.0.3(transitive)
+ Addedetag@1.8.1(transitive)
+ Addedexpress@4.17.1(transitive)
+ Addedfinalhandler@1.1.2(transitive)
+ Addedforwarded@0.2.0(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedhttp-errors@1.7.2(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedinherits@2.0.3(transitive)
+ Addedipaddr.js@1.9.1(transitive)
+ Addedmedia-typer@0.3.0(transitive)
+ Addedmerge-descriptors@1.0.1(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedms@2.0.02.1.1(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedon-finished@2.3.0(transitive)
+ Addedparseurl@1.3.3(transitive)
+ Addedpath-to-regexp@0.1.7(transitive)
+ Addedproxy-addr@2.0.7(transitive)
+ Addedqs@6.7.0(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedraw-body@2.4.0(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsend@0.17.1(transitive)
+ Addedserve-static@1.14.1(transitive)
+ Addedsetprototypeof@1.1.1(transitive)
+ Addedstatuses@1.5.0(transitive)
+ Addedtoidentifier@1.0.0(transitive)
+ Addedtype-is@1.6.18(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedutils-merge@1.0.1(transitive)
+ Addedvary@1.1.2(transitive)
- Removedlodash@4.17.20
- Removedlodash@4.17.20(transitive)