@@ -10,7 +10,6 @@ const hosts = {};
10
10
class CoCreateLazyLoader {
11
11
constructor ( server , crud , files ) {
12
12
this . server = server
13
- // this.acme = server.acme
14
13
this . wsManager = crud . wsManager
15
14
this . crud = crud
16
15
this . files = files
@@ -47,14 +46,13 @@ class CoCreateLazyLoader {
47
46
} ) ;
48
47
}
49
48
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' ) )
49
+ this . server . https . on ( 'request' , ( req , res ) => this . request ( req , res ) )
50
+ this . server . http . on ( 'request' , ( req , res ) => this . request ( req , res ) )
52
51
53
52
}
54
53
55
- async request ( req , res , protocol ) {
54
+ async request ( req , res ) {
56
55
try {
57
- console . log ( 'server' , protocol )
58
56
const valideUrl = new URL ( `http://${ req . headers . host } ${ req . url } ` ) ;
59
57
const hostname = valideUrl . hostname ;
60
58
@@ -84,8 +82,6 @@ class CoCreateLazyLoader {
84
82
85
83
hosts [ hostname ] = organization
86
84
87
- // await this.acme.checkCertificate(hostname, organization._id, req.url)
88
-
89
85
if ( valideUrl . pathname . startsWith ( '/webhooks/' ) ) {
90
86
let name = req . url . split ( '/' ) [ 2 ] ; // Assuming URL structure is /webhook/name/...
91
87
if ( this . modules [ name ] ) {
0 commit comments