Skip to content

Commit

Permalink
Updated createHttpServer to target tls1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Chomp committed Feb 19, 2025
1 parent 3edb8ca commit 0c9c6a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions project/src/servers/HttpServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,16 @@ export class HttpServer {
} catch (err: unknown) {
const timer = new Timer();
credentials = await this.generateSelfSignedCertificate();
this.logger.debug(`Generating self-signed SSL certificate took ${timer.getTime("sec")}s`);
this.logger.debug(`Generating self-signed SSL certificate took: ${timer.getTime("sec")}s`);
}
return https.createServer(credentials);

const options: https.ServerOptions = {
cert: credentials.cert,
key: credentials.key,
minVersion: "TLSv1.2",
maxVersion: "TLSv1.2",
};
return https.createServer(options);
}

/**
Expand Down

0 comments on commit 0c9c6a2

Please sign in to comment.