Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 8b00759

Browse files
author
bhasher
committed
Verify than redirect port is not null
1 parent 1e0baee commit 8b00759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const config = require('./config/config');
2929
const http = ssl ? require('https') : require('http');
3030
const server = http.createServer(options, app);
3131

32-
if (ssl) {
32+
if (ssl && configs.REDIRECT_PORT !== null) {
3333
require('http').createServer(app).listen(configs.REDIRECT_PORT, host, () => {
3434
console.log(`http requests from ${configs.REDIRECT_PORT} are redirected to https on ${configs.PORT}`)
3535
})

0 commit comments

Comments
 (0)