Skip to content

Commit f01831b

Browse files
committed
feat: Added '@cocreate/acme' for dynamic ssl management
1 parent 2e13dcb commit f01831b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ class SocketServer extends EventEmitter {
6363
socket.host = socket.origin;
6464
}
6565

66+
if (!await self.acme.checkCertificate(socket.host, organization_id))
67+
return socket.send(JSON.stringify({ method: 'Access Denied', error: 'Host not whitelisted' }))
6668

67-
// TODO: handle ssl validation here and creation here
6869
if (!organization || organization && organization.status !== false) {
6970
let data = {
7071
socket,

0 commit comments

Comments
 (0)