File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -80,20 +80,20 @@ function createServer (argv, app) {
80
80
}
81
81
82
82
// Look for port or list of ports to redirect to argv.port
83
- if ( 'redirectHTTPFrom ' in argv ) {
84
- const redirectHTTPFroms = argv . redirectHTTPFrom . constructor === Array
85
- ? argv . redirectHTTPFrom
86
- : [ argv . redirectHTTPFrom ]
83
+ if ( 'redirectHttpFrom ' in argv ) {
84
+ const redirectHttpFroms = argv . redirectHttpFrom . constructor === Array
85
+ ? argv . redirectHttpFrom
86
+ : [ argv . redirectHttpFrom ]
87
87
const portStr = argv . port === 443 ? '' : ':' + argv . port
88
- redirectHTTPFroms . forEach ( redirectHTTPFrom => {
89
- debug . settings ( 'will redirect from port ' + redirectHTTPFrom + ' to port ' + argv . port )
88
+ redirectHttpFroms . forEach ( redirectHttpFrom => {
89
+ debug . settings ( 'will redirect from port ' + redirectHttpFrom + ' to port ' + argv . port )
90
90
let redirectingServer = express ( )
91
91
redirectingServer . get ( '*' , function ( req , res ) {
92
92
let host = req . headers . host . split ( ':' ) // ignore port
93
93
debug . server ( host , '=> https://' + host + portStr + req . url )
94
94
res . redirect ( 'https://' + host + portStr + req . url )
95
95
} )
96
- redirectingServer . listen ( redirectHTTPFrom )
96
+ redirectingServer . listen ( redirectHttpFrom )
97
97
} )
98
98
}
99
99
You can’t perform that action at this time.
0 commit comments