@reldens/server-utils 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app-server-factory.js +0 -14
- package/package.json +2 -3
|
@@ -12,7 +12,6 @@ const { CorsConfigurer } = require('./app-server-factory/cors-configurer');
|
|
|
12
12
|
const { RateLimitConfigurer } = require('./app-server-factory/rate-limit-configurer');
|
|
13
13
|
const http = require('http');
|
|
14
14
|
const https = require('https');
|
|
15
|
-
const spdy = require('spdy');
|
|
16
15
|
const express = require('express');
|
|
17
16
|
const bodyParser = require('body-parser');
|
|
18
17
|
const session = require('express-session');
|
|
@@ -35,7 +34,6 @@ class AppServerFactory
|
|
|
35
34
|
this.useUrlencoded = true;
|
|
36
35
|
this.encoding = 'utf-8';
|
|
37
36
|
this.useHttps = false;
|
|
38
|
-
this.useHttp2 = false;
|
|
39
37
|
this.passphrase = '';
|
|
40
38
|
this.httpsChain = '';
|
|
41
39
|
this.keyPath = '';
|
|
@@ -382,10 +380,6 @@ class AppServerFactory
|
|
|
382
380
|
createServer()
|
|
383
381
|
{
|
|
384
382
|
if(!this.useHttps){
|
|
385
|
-
if(this.useHttp2){
|
|
386
|
-
this.error = {message: 'HTTP/2 requires HTTPS to be enabled'};
|
|
387
|
-
return false;
|
|
388
|
-
}
|
|
389
383
|
return http.createServer(this.app);
|
|
390
384
|
}
|
|
391
385
|
if(this.useVirtualHosts && 0 < this.domains.length){
|
|
@@ -413,10 +407,6 @@ class AppServerFactory
|
|
|
413
407
|
credentials.ca = ca;
|
|
414
408
|
}
|
|
415
409
|
}
|
|
416
|
-
if(this.useHttp2){
|
|
417
|
-
credentials.spdy = {protocols: ['h2', 'http/1.1']};
|
|
418
|
-
return spdy.createServer(credentials, this.app);
|
|
419
|
-
}
|
|
420
410
|
return https.createServer(credentials, this.app);
|
|
421
411
|
}
|
|
422
412
|
|
|
@@ -445,10 +435,6 @@ class AppServerFactory
|
|
|
445
435
|
let ctx = tls.createSecureContext({key, cert});
|
|
446
436
|
callback(null, ctx);
|
|
447
437
|
};
|
|
448
|
-
if(this.useHttp2){
|
|
449
|
-
httpsOptions.spdy = {protocols: ['h2', 'http/1.1']};
|
|
450
|
-
return spdy.createServer(httpsOptions, this.app);
|
|
451
|
-
}
|
|
452
438
|
return https.createServer(httpsOptions, this.app);
|
|
453
439
|
}
|
|
454
440
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reldens/server-utils",
|
|
3
3
|
"scope": "@reldens",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.35.0",
|
|
5
5
|
"description": "Reldens - Server Utils",
|
|
6
6
|
"author": "Damian A. Pastorini",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"express-session": "1.18.2",
|
|
45
45
|
"helmet": "8.1.0",
|
|
46
46
|
"multer": "2.0.2",
|
|
47
|
-
"sanitize-html": "2.17.0"
|
|
48
|
-
"spdy": "^4.0.2"
|
|
47
|
+
"sanitize-html": "2.17.0"
|
|
49
48
|
}
|
|
50
49
|
}
|