Skip to content

Commit

Permalink
feat: Added '@cocreate/acme' for dynamic ssl management
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Dec 29, 2023
1 parent a63b450 commit 5916bd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CoCreateLazyLoader {
constructor(server, crud, files) {
this.server = server
this.wsManager = crud.wsManager
this.acme = crud.wsManager.acme
this.crud = crud
this.files = files
this.exclusion = { ...require.cache };
Expand Down Expand Up @@ -73,7 +74,8 @@ class CoCreateLazyLoader {

hosts[hostname] = organization

// TODO: handle ssl validation here and creation here
await this.acme.checkCertificate(hostname, organization._id)

if (valideUrl.pathname.startsWith('/webhooks/')) {
let name = req.url.split('/')[2]; // Assuming URL structure is /webhook/name/...
if (this.modules[name]) {
Expand Down

0 comments on commit 5916bd5

Please sign in to comment.