@@ -10,8 +10,8 @@ const hosts = {};
1010class CoCreateLazyLoader {
1111 constructor ( server , crud , files ) {
1212 this . server = server
13+ // this.acme = server.acme
1314 this . wsManager = crud . wsManager
14- this . acme = crud . wsManager . acme
1515 this . crud = crud
1616 this . files = files
1717 this . exclusion = { ...require . cache } ;
@@ -47,13 +47,14 @@ class CoCreateLazyLoader {
4747 } ) ;
4848 }
4949
50- this . server . https . on ( 'request' , ( req , res ) => this . request ( req , res ) )
51- this . server . http . on ( 'request' , ( req , res ) => this . request ( req , res ) )
50+ this . server . https . on ( 'request' , ( req , res ) => this . request ( req , res , 'HTTPS' ) )
51+ this . server . http . on ( 'request' , ( req , res ) => this . request ( req , res , 'HTTP' ) )
5252
5353 }
5454
55- async request ( req , res ) {
55+ async request ( req , res , protocol ) {
5656 try {
57+ console . log ( 'server' , protocol )
5758 const valideUrl = new URL ( `http://${ req . headers . host } ${ req . url } ` ) ;
5859 const hostname = valideUrl . hostname ;
5960
@@ -83,7 +84,7 @@ class CoCreateLazyLoader {
8384
8485 hosts [ hostname ] = organization
8586
86- await this . acme . checkCertificate ( hostname , organization . _id , req . url )
87+ // await this.acme.checkCertificate(hostname, organization._id, req.url)
8788
8889 if ( valideUrl . pathname . startsWith ( '/webhooks/' ) ) {
8990 let name = req . url . split ( '/' ) [ 2 ] ; // Assuming URL structure is /webhook/name/...
0 commit comments