Skip to content

Commit b7c3b98

Browse files
committed
Merge branch 'master' into dev
2 parents 0d7e93c + 2d50fad commit b7c3b98

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ The directory `ostracodMultiplayerConfig` should contain these files:
3838

3939
* `ostracodMultiplayerConfig/ssl.crt`
4040
* `ostracodMultiplayerConfig/ssl.key`
41+
* `ostracodMultiplayerConfig/ssl.ca-bundle` (Optional)
4142
* `ostracodMultiplayerConfig/serverConfig.json`
4243
* `ostracodMultiplayerConfig/gameConfig.json`
4344
* `ostracodMultiplayerConfig/databaseConfig.json`
4445
* `ostracodMultiplayerConfig/schemaConfig.json`
4546
* `ostracodMultiplayerConfig/favicon.ico` (Optional)
4647

47-
`ssl.crt` and `ssl.key` are the files required to enable https.
48+
`ssl.crt` and `ssl.key` are the files required to enable https. `ssl.ca-bundle` may also be necessary depending on your certificate provider.
4849

4950
Format of `serverConfig.json`:
5051

ostracodMultiplayer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ OstracodMultiplayer.prototype.initializeServer = function(basePath, gameDelegate
9999
var privateKey = fs.readFileSync(pathUtils.join(this.configDirectory, "ssl.key"), "utf8");
100100
var certificate = fs.readFileSync(pathUtils.join(this.configDirectory, "ssl.crt"), "utf8");
101101
var credentials = {key: privateKey, cert: certificate};
102+
var tempPath = pathUtils.join(this.configDirectory, "ssl.ca-bundle");
103+
if (fs.existsSync(tempPath)) {
104+
credentials.ca = fs.readFileSync(tempPath);
105+
}
102106
server = https.createServer(credentials, this.expressApp);
103107
}
104108
expressWs(this.expressApp, server);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ostracod-multiplayer",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"main": "index.js",
55
"dependencies": {
66
"bcrypt": "^3.0.8",

0 commit comments

Comments
 (0)