Merge pull request #492 from duno9/main

Fixed possible error with hosting on port 80 or 443
This commit is contained in:
Cohee
2023-06-14 13:04:02 +03:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -3213,7 +3213,6 @@ if (listen && !config.whitelistMode && !config.basicAuthMode) {
process.exit(1);
}
}
if (true === cliArguments.ssl)
https.createServer(
{
@@ -3221,13 +3220,13 @@ if (true === cliArguments.ssl)
key: fs.readFileSync(cliArguments.keyPath)
}, app)
.listen(
tavernUrl.port,
tavernUrl.port || 443,
tavernUrl.hostname,
setupTasks
);
else
http.createServer(app).listen(
tavernUrl.port,
tavernUrl.port || 80,
tavernUrl.hostname,
setupTasks
);