Skip to content

Commit

Permalink
Tweak so status page doesn't crash with default config and no keys
Browse files Browse the repository at this point in the history
  • Loading branch information
sebjf committed Jan 10, 2024
1 parent 7ce5673 commit 306ddd7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Node/modules/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ export class Status {
this.roomServer = roomServer
this.apikeys = config.apikeys

const options = {
key: fs.readFileSync(path.resolve(config.key)),
cert: fs.readFileSync(path.resolve(config.cert))
const options: any = {}

try {
options.key = fs.readFileSync(path.resolve(config.key))
options.cert = fs.readFileSync(path.resolve(config.cert))
} catch (error) {
console.error('Unable to read certificate for status module. You will not be able to create secure connections to the status APIs.')
}

const app = express()
Expand Down

0 comments on commit 306ddd7

Please sign in to comment.