Skip to content

Commit eccaec1

Browse files
authored
Merge pull request #1125 from ecobytes/fix/1124
repairs redirect due to case typo correction
2 parents 3d082f1 + dafc228 commit eccaec1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/create-server.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,20 @@ function createServer (argv, app) {
8080
}
8181

8282
// 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]
8787
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)
9090
let redirectingServer = express()
9191
redirectingServer.get('*', function (req, res) {
9292
let host = req.headers.host.split(':') // ignore port
9393
debug.server(host, '=> https://' + host + portStr + req.url)
9494
res.redirect('https://' + host + portStr + req.url)
9595
})
96-
redirectingServer.listen(redirectHTTPFrom)
96+
redirectingServer.listen(redirectHttpFrom)
9797
})
9898
}
9999

0 commit comments

Comments
 (0)