@boo-labs/server 0.0.0-stage → 1.0.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/README.md +229 -2
- package/index.mjs +23 -0
- package/package.json +71 -4
- package/source/application/Kernel/index.mjs +1137 -0
- package/source/application/Server/index.mjs +1201 -0
- package/source/application/configurations/Http2CleartextServerConfiguration/index.mjs +168 -0
- package/source/application/configurations/Http2SecureServerConfiguration/index.mjs +172 -0
- package/source/application/configurations/HttpServerConfiguration/index.mjs +169 -0
- package/source/application/configurations/HttpsServerConfiguration/index.mjs +172 -0
- package/source/application/configurations/ServerConfiguration/Options/CORSOptions/CORSOptionsValue.mjs +158 -0
- package/source/application/configurations/ServerConfiguration/Options/CORSOptions/index.mjs +87 -0
- package/source/application/configurations/ServerConfiguration/Options/CSRFOptions/CSRFOptionsValue.mjs +178 -0
- package/source/application/configurations/ServerConfiguration/Options/CSRFOptions/index.mjs +80 -0
- package/source/application/configurations/ServerConfiguration/Options/CompressOptions/CompressOptionsValue.mjs +126 -0
- package/source/application/configurations/ServerConfiguration/Options/CompressOptions/index.mjs +81 -0
- package/source/application/configurations/ServerConfiguration/Options/CookieParserOptions/CookieParserOptionsValue.mjs +107 -0
- package/source/application/configurations/ServerConfiguration/Options/CookieParserOptions/index.mjs +82 -0
- package/source/application/configurations/ServerConfiguration/Options/CookieSessionOptions/CookieSessionOptionsValue.mjs +182 -0
- package/source/application/configurations/ServerConfiguration/Options/CookieSessionOptions/index.mjs +86 -0
- package/source/application/configurations/ServerConfiguration/Options/ListenOptions/ListenOptionsValue.mjs +95 -0
- package/source/application/configurations/ServerConfiguration/Options/ListenOptions/index.mjs +47 -0
- package/source/application/configurations/ServerConfiguration/Options/MiddlewareOption.mjs +102 -0
- package/source/application/configurations/ServerConfiguration/Options/Options.mjs +105 -0
- package/source/application/configurations/ServerConfiguration/Options/RateLimitOptions/RateLimitOptionsValue.mjs +164 -0
- package/source/application/configurations/ServerConfiguration/Options/RateLimitOptions/index.mjs +84 -0
- package/source/application/configurations/ServerConfiguration/Options/RequestOptions/RequestOptionsValue.mjs +108 -0
- package/source/application/configurations/ServerConfiguration/Options/RequestOptions/index.mjs +47 -0
- package/source/application/configurations/ServerConfiguration/Options/ResponseOptions/ResponseOptionsValue.mjs +101 -0
- package/source/application/configurations/ServerConfiguration/Options/ResponseOptions/index.mjs +47 -0
- package/source/application/configurations/ServerConfiguration/Options/SecurityHeadersOptions/SecurityHeadersOptionsValue.mjs +272 -0
- package/source/application/configurations/ServerConfiguration/Options/SecurityHeadersOptions/index.mjs +85 -0
- package/source/application/configurations/ServerConfiguration/Options/ServerOption.mjs +50 -0
- package/source/application/configurations/ServerConfiguration/Options/StaticOptions/StaticOptionsValue.mjs +164 -0
- package/source/application/configurations/ServerConfiguration/Options/StaticOptions/index.mjs +89 -0
- package/source/application/configurations/ServerConfiguration/index.mjs +781 -0
- package/source/application/resolvers/TransportResolver/index.mjs +119 -0
- package/source/application/use-cases/CloseServer/index.mjs +85 -0
- package/source/application/use-cases/ListenServer/index.mjs +98 -0
- package/source/core/EventSystem/index.mjs +110 -0
- package/source/core/Exchange/ExchangeContext.mjs +291 -0
- package/source/core/Exchange/Telemetry.mjs +193 -0
- package/source/core/Exchange/index.mjs +604 -0
- package/source/core/ExchangeLayerBuilder/index.mjs +133 -0
- package/source/core/IPCMain/IPCMain.mjs +507 -0
- package/source/core/IPCMain/IPCProtocol.mjs +441 -0
- package/source/core/IPCMain/IPCServerChannel.mjs +331 -0
- package/source/core/IPCMain/WebSocketAdapter.mjs +189 -0
- package/source/core/Request/BodyParser/BodyParser.mjs +197 -0
- package/source/core/Request/BodyParser/JSONParser.mjs +70 -0
- package/source/core/Request/BodyParser/MultipartParser.mjs +612 -0
- package/source/core/Request/BodyParser/URLEncodedParser.mjs +71 -0
- package/source/core/Request/RequestHeaders.mjs +177 -0
- package/source/core/Request/index.mjs +805 -0
- package/source/core/Response/ResponseHeaders.mjs +402 -0
- package/source/core/Response/index.mjs +1370 -0
- package/source/core/middlewares/CORSMiddleware/index.mjs +289 -0
- package/source/core/middlewares/CSRFMiddleware/index.mjs +284 -0
- package/source/core/middlewares/CompressMiddleware/index.mjs +460 -0
- package/source/core/middlewares/CookieParserMiddleware/index.mjs +194 -0
- package/source/core/middlewares/CookieSessionMiddleware/index.mjs +460 -0
- package/source/core/middlewares/RateLimitMiddleware/index.mjs +245 -0
- package/source/core/middlewares/SecurityHeadersMiddleware/index.mjs +151 -0
- package/source/core/middlewares/StaticMiddleware/index.mjs +628 -0
- package/source/core/routing/ExchangeLayer/ExchangeMatcher.mjs +127 -0
- package/source/core/routing/ExchangeLayer/index.mjs +254 -0
- package/source/core/routing/Pipeline/index.mjs +157 -0
- package/source/core/routing/Router/Route.mjs +184 -0
- package/source/core/routing/Router/index.mjs +523 -0
- package/source/core/routing/RouterRegister/OptionsMiddleware.mjs +147 -0
- package/source/core/routing/RouterRegister/index.mjs +150 -0
- package/source/core/routing/RouterSystem/index.mjs +225 -0
- package/source/core/value-objects/Address/index.mjs +281 -0
- package/source/core/value-objects/Endpoint/index.mjs +293 -0
- package/source/index.mjs +62 -0
- package/source/infrastructure/adapters/Http2Adapter/index.mjs +144 -0
- package/source/infrastructure/adapters/Http2CleartextAdapter/index.mjs +147 -0
- package/source/infrastructure/adapters/HttpAdapter/index.mjs +124 -0
- package/source/infrastructure/adapters/HttpsAdapter/index.mjs +124 -0
- package/source/infrastructure/adapters/TransportAdapter/createWebSocketOpenRequest.mjs +843 -0
- package/source/infrastructure/adapters/TransportAdapter/index.mjs +555 -0
- package/source/shared/Identifier/index.mjs +671 -0
- package/source/shared/constants/symbols/brands/index.mjs +45 -0
- package/source/shared/domain/UUIDV7/index.mjs +346 -0
- package/source/shared/errors/BaseError/index.mjs +157 -0
- package/source/shared/errors/IPCError/index.mjs +97 -0
- package/source/shared/errors/MiddlewareError/index.mjs +106 -0
- package/source/shared/errors/PathnamePatternError/index.mjs +103 -0
- package/source/shared/errors/RequestError/index.mjs +116 -0
- package/source/shared/errors/ResponseError/index.mjs +140 -0
- package/source/shared/errors/RouterError/index.mjs +90 -0
- package/source/shared/errors/ServerConfigurationError/index.mjs +551 -0
- package/source/shared/errors/ServerError/index.mjs +127 -0
- package/source/shared/errors/WebSocketError/index.mjs +58 -0
- package/source/shared/outcome/ErrorSchema.mjs +361 -0
- package/source/shared/outcome/Result/index.mjs +239 -0
- package/source/shared/outcome/Validation/index.mjs +208 -0
- package/source/shared/validations/Middleware/index.mjs +160 -0
- package/source/shared/validations/PathnamePattern/index.mjs +256 -0
- package/source/shared/validations/Server/NotFoundHandler/index.mjs +94 -0
- package/source/shared/validations/Server/Router/index.mjs +68 -0
- package/source/shared/validations/Server/ServerConfiguration/index.mjs +68 -0
- package/source/shared/validations/Server/SystemErrorHandler/index.mjs +94 -0
- package/source/shared/validations/ServerConfiguration/CORSOptions/index.mjs +310 -0
- package/source/shared/validations/ServerConfiguration/CSRFOptions/index.mjs +299 -0
- package/source/shared/validations/ServerConfiguration/CompressOptions/index.mjs +204 -0
- package/source/shared/validations/ServerConfiguration/CookieParserOptions/index.mjs +102 -0
- package/source/shared/validations/ServerConfiguration/CookieSessionOptions/index.mjs +332 -0
- package/source/shared/validations/ServerConfiguration/ListenOptions/index.mjs +178 -0
- package/source/shared/validations/ServerConfiguration/RateLimitOptions/index.mjs +229 -0
- package/source/shared/validations/ServerConfiguration/RequestOptions/index.mjs +132 -0
- package/source/shared/validations/ServerConfiguration/ResponseOptions/index.mjs +122 -0
- package/source/shared/validations/ServerConfiguration/SecurityHeadersOptions/index.mjs +137 -0
- package/source/shared/validations/ServerConfiguration/StaticOptions/index.mjs +248 -0
- package/types/index.d.ts +719 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* @file Defines the HTTP/2 cleartext server configuration.
|
|
4
|
+
*
|
|
5
|
+
* @description Provides the configuration used to create and operate a
|
|
6
|
+
* Node.js HTTP/2 server over a cleartext (h2c) connection.
|
|
7
|
+
*
|
|
8
|
+
* Http2CleartextServerConfiguration defines the server-level configuration
|
|
9
|
+
* for listening, request handling, response handling, static file serving,
|
|
10
|
+
* cross-origin resource sharing, security headers, rate limiting, cookies,
|
|
11
|
+
* CSRF protection, response compression, and the underlying HTTP/2 connection.
|
|
12
|
+
*
|
|
13
|
+
* @module Http2CleartextServerConfiguration
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ━━ IMPORT MODULES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
17
|
+
// » IMPORT NATIVE NODEJS MODULES
|
|
18
|
+
|
|
19
|
+
// » IMPORT THIRD PARTY MODULES
|
|
20
|
+
|
|
21
|
+
// » IMPORT LOCAL MODULES
|
|
22
|
+
import ServerConfiguration from '../ServerConfiguration/index.mjs';
|
|
23
|
+
|
|
24
|
+
// ━━ TYPE DEFINITIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
25
|
+
/**
|
|
26
|
+
* HTTP/2 cleartext server connection options.
|
|
27
|
+
*
|
|
28
|
+
* @typedef {import('node:http2').ServerOptions} Http2ConnectionOptions
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Identity of a cleartext HTTP/2 server.
|
|
33
|
+
*
|
|
34
|
+
* @typedef {object} Http2CleartextServerConfigurationIdentity
|
|
35
|
+
* @property {'http'} protocol - Application-level protocol.
|
|
36
|
+
* @property {'h2c'} transport - Transport identifier for HTTP/2 cleartext.
|
|
37
|
+
* @property {Http2ConnectionOptions} [connection] - HTTP/2 cleartext connection options.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Represents the listen options accepted by the server configuration.
|
|
42
|
+
*
|
|
43
|
+
* @typedef {import('#ServerOptions/ListenOptions').ListenOptionsInput} ListenOptionsInput
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Represents the request options accepted by the server configuration.
|
|
48
|
+
*
|
|
49
|
+
* @typedef {import('#ServerOptions/RequestOptions').RequestOptionsInput} RequestOptionsInput
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Represents the response options accepted by the server configuration.
|
|
54
|
+
*
|
|
55
|
+
* @typedef {import('#ServerOptions/ResponseOptions').ResponseOptionsInput} ResponseOptionsInput
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Represents the static file serving options accepted by the server configuration.
|
|
60
|
+
*
|
|
61
|
+
* @typedef {import('#ServerOptions/StaticOptions').StaticOptionsInput} StaticOptionsInput
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Represents the CORS options accepted by the server configuration.
|
|
66
|
+
*
|
|
67
|
+
* @typedef {import('#ServerOptions/CORSOptions').CORSOptionsInput} CORSOptionsInput
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Represents the security headers options accepted by the server configuration.
|
|
72
|
+
*
|
|
73
|
+
* @typedef {import('#ServerOptions/SecurityHeadersOptions').SecurityHeadersOptionsInput} SecurityHeadersOptionsInput
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Represents the rate limit options accepted by the server configuration.
|
|
78
|
+
*
|
|
79
|
+
* @typedef {import('#ServerOptions/RateLimitOptions').RateLimitOptionsInput} RateLimitOptionsInput
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Represents the cookie parser options accepted by the server configuration.
|
|
84
|
+
*
|
|
85
|
+
* @typedef {import('#ServerOptions/CookieParserOptions').CookieParserOptionsInput} CookieParserOptionsInput
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Represents the cookie session options accepted by the server configuration.
|
|
90
|
+
*
|
|
91
|
+
* @typedef {import('#ServerOptions/CookieSessionOptions').CookieSessionOptionsInput} CookieSessionOptionsInput
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Represents the CSRF options accepted by the server configuration.
|
|
96
|
+
*
|
|
97
|
+
* @typedef {import('#ServerOptions/CSRFOptions').CSRFOptionsInput} CSRFOptionsInput
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Represents the compression options accepted by the server configuration.
|
|
102
|
+
*
|
|
103
|
+
* @typedef {import('#ServerOptions/CompressOptions').CompressOptionsInput} CompressOptionsInput
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Represents the cookie options accepted by the server configuration.
|
|
108
|
+
*
|
|
109
|
+
* @typedef {object} CookieOptionsInput
|
|
110
|
+
* @property {CookieParserOptionsInput} [parser] - Cookie parser configuration.
|
|
111
|
+
* @property {CookieSessionOptionsInput} [session] - Cookie session configuration.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Options accepted by {@link Http2CleartextServerConfiguration}.
|
|
116
|
+
*
|
|
117
|
+
* @typedef {object} Http2CleartextServerConfigurationOptions
|
|
118
|
+
* @property {Http2ConnectionOptions} [connection] - HTTP/2 cleartext server connection options.
|
|
119
|
+
* @property {ListenOptionsInput} [listen] - Server listening configuration.
|
|
120
|
+
* @property {RequestOptionsInput} [request] - Request handling configuration.
|
|
121
|
+
* @property {ResponseOptionsInput} [response] - Response handling configuration.
|
|
122
|
+
* @property {StaticOptionsInput} [static] - Static file serving configuration.
|
|
123
|
+
* @property {CORSOptionsInput} [cors] - CORS configuration.
|
|
124
|
+
* @property {SecurityHeadersOptionsInput} [securityHeaders] - Security headers configuration.
|
|
125
|
+
* @property {RateLimitOptionsInput} [rateLimit] - Rate limit configuration.
|
|
126
|
+
* @property {CookieOptionsInput} [cookie] - Cookie configuration.
|
|
127
|
+
* @property {CSRFOptionsInput} [csrf] - CSRF configuration.
|
|
128
|
+
* @property {CompressOptionsInput} [compress] - Compression configuration.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
// ━━ MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
132
|
+
/**
|
|
133
|
+
* Configuration for a Node.js HTTP/2 server operating over cleartext (h2c).
|
|
134
|
+
*
|
|
135
|
+
* @classdesc Http2CleartextServerConfiguration provides the server configuration
|
|
136
|
+
* required to create and operate an HTTP/2 cleartext server, including connection,
|
|
137
|
+
* listening, request, response, static file serving, CORS, security headers,
|
|
138
|
+
* rate limiting, cookie, CSRF, and compression options.
|
|
139
|
+
*
|
|
140
|
+
* @augments ServerConfiguration<Http2CleartextServerConfigurationIdentity>
|
|
141
|
+
*/
|
|
142
|
+
class Http2CleartextServerConfiguration extends ServerConfiguration {
|
|
143
|
+
/**
|
|
144
|
+
* Creates a new {@link Http2CleartextServerConfiguration}.
|
|
145
|
+
*
|
|
146
|
+
* @param {Http2CleartextServerConfigurationOptions} options - Server configuration options.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```js
|
|
150
|
+
* const configuration = new Http2CleartextServerConfiguration({
|
|
151
|
+
* listen: {
|
|
152
|
+
* host: 'localhost',
|
|
153
|
+
* port: 3000,
|
|
154
|
+
* },
|
|
155
|
+
* });
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
constructor(options) {
|
|
159
|
+
super({
|
|
160
|
+
...options,
|
|
161
|
+
transport: 'h2c',
|
|
162
|
+
protocol: 'http',
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// ━━ EXPORT MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
168
|
+
export default Http2CleartextServerConfiguration;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* @file Defines the HTTP/2 secure server configuration.
|
|
4
|
+
*
|
|
5
|
+
* @description Provides the configuration used to create and operate a
|
|
6
|
+
* Node.js HTTP/2 server over a TLS connection.
|
|
7
|
+
*
|
|
8
|
+
* Http2SecureServerConfiguration defines the server-level configuration for
|
|
9
|
+
* listening, request handling, response handling, static file serving,
|
|
10
|
+
* cross-origin resource sharing, security headers, rate limiting, cookies,
|
|
11
|
+
* CSRF protection, response compression, and the underlying HTTP/2 connection.
|
|
12
|
+
*
|
|
13
|
+
* @module Http2SecureServerConfiguration
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ━━ IMPORT MODULES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
17
|
+
// » IMPORT NATIVE NODEJS MODULES
|
|
18
|
+
|
|
19
|
+
// » IMPORT THIRD PARTY MODULES
|
|
20
|
+
|
|
21
|
+
// » IMPORT LOCAL MODULES
|
|
22
|
+
import ServerConfiguration from '../ServerConfiguration/index.mjs';
|
|
23
|
+
|
|
24
|
+
// ━━ TYPE DEFINITIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
25
|
+
/**
|
|
26
|
+
* HTTP/2 secure server connection options.
|
|
27
|
+
*
|
|
28
|
+
* @typedef {import('node:http2').SecureServerOptions} Http2SecureConnectionOptions
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Identity of a secure HTTP/2 server.
|
|
33
|
+
*
|
|
34
|
+
* @typedef {object} Http2SecureServerConfigurationIdentity
|
|
35
|
+
* @property {'https'} protocol - Application-level protocol.
|
|
36
|
+
* @property {'h2'} transport - Transport identifier for HTTP/2 over TLS.
|
|
37
|
+
* @property {Http2SecureConnectionOptions} [connection] - HTTP/2 secure connection options.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Represents the listen options accepted by the server configuration.
|
|
42
|
+
*
|
|
43
|
+
* @typedef {import('#ServerOptions/ListenOptions').ListenOptionsInput} ListenOptionsInput
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Represents the request options accepted by the server configuration.
|
|
48
|
+
*
|
|
49
|
+
* @typedef {import('#ServerOptions/RequestOptions').RequestOptionsInput} RequestOptionsInput
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Represents the response options accepted by the server configuration.
|
|
54
|
+
*
|
|
55
|
+
* @typedef {import('#ServerOptions/ResponseOptions').ResponseOptionsInput} ResponseOptionsInput
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Represents the static file serving options accepted by the server configuration.
|
|
60
|
+
*
|
|
61
|
+
* @typedef {import('#ServerOptions/StaticOptions').StaticOptionsInput} StaticOptionsInput
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Represents the CORS options accepted by the server configuration.
|
|
66
|
+
*
|
|
67
|
+
* @typedef {import('#ServerOptions/CORSOptions').CORSOptionsInput} CORSOptionsInput
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Represents the security headers options accepted by the server configuration.
|
|
72
|
+
*
|
|
73
|
+
* @typedef {import('#ServerOptions/SecurityHeadersOptions').SecurityHeadersOptionsInput} SecurityHeadersOptionsInput
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Represents the rate limit options accepted by the server configuration.
|
|
78
|
+
*
|
|
79
|
+
* @typedef {import('#ServerOptions/RateLimitOptions').RateLimitOptionsInput} RateLimitOptionsInput
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Represents the cookie parser options accepted by the server configuration.
|
|
84
|
+
*
|
|
85
|
+
* @typedef {import('#ServerOptions/CookieParserOptions').CookieParserOptionsInput} CookieParserOptionsInput
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Represents the cookie session options accepted by the server configuration.
|
|
90
|
+
*
|
|
91
|
+
* @typedef {import('#ServerOptions/CookieSessionOptions').CookieSessionOptionsInput} CookieSessionOptionsInput
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Represents the CSRF options accepted by the server configuration.
|
|
96
|
+
*
|
|
97
|
+
* @typedef {import('#ServerOptions/CSRFOptions').CSRFOptionsInput} CSRFOptionsInput
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Represents the compression options accepted by the server configuration.
|
|
102
|
+
*
|
|
103
|
+
* @typedef {import('#ServerOptions/CompressOptions').CompressOptionsInput} CompressOptionsInput
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Represents the cookie options accepted by the server configuration.
|
|
108
|
+
*
|
|
109
|
+
* @typedef {object} CookieOptionsInput
|
|
110
|
+
* @property {CookieParserOptionsInput} [parser] - Cookie parser configuration.
|
|
111
|
+
* @property {CookieSessionOptionsInput} [session] - Cookie session configuration.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Options accepted by {@link Http2SecureServerConfiguration}.
|
|
116
|
+
*
|
|
117
|
+
* @typedef {object} Http2SecureServerConfigurationOptions
|
|
118
|
+
* @property {Http2SecureConnectionOptions} [connection] - HTTP/2 secure server connection options.
|
|
119
|
+
* @property {ListenOptionsInput} [listen] - Server listening configuration.
|
|
120
|
+
* @property {RequestOptionsInput} [request] - Request handling configuration.
|
|
121
|
+
* @property {ResponseOptionsInput} [response] - Response handling configuration.
|
|
122
|
+
* @property {StaticOptionsInput} [static] - Static file serving configuration.
|
|
123
|
+
* @property {CORSOptionsInput} [cors] - CORS configuration.
|
|
124
|
+
* @property {SecurityHeadersOptionsInput} [securityHeaders] - Security headers configuration.
|
|
125
|
+
* @property {RateLimitOptionsInput} [rateLimit] - Rate limit configuration.
|
|
126
|
+
* @property {CookieOptionsInput} [cookie] - Cookie configuration.
|
|
127
|
+
* @property {CSRFOptionsInput} [csrf] - CSRF configuration.
|
|
128
|
+
* @property {CompressOptionsInput} [compress] - Compression configuration.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
// ━━ MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
132
|
+
/**
|
|
133
|
+
* Configuration for a Node.js HTTP/2 server operating over TLS.
|
|
134
|
+
*
|
|
135
|
+
* @classdesc Http2SecureServerConfiguration provides the server configuration
|
|
136
|
+
* required to create and operate an HTTP/2 server over TLS, including
|
|
137
|
+
* connection, listening, request, response, static file serving, CORS,
|
|
138
|
+
* security headers, rate limiting, cookie, CSRF, and compression options.
|
|
139
|
+
*
|
|
140
|
+
* @augments ServerConfiguration<Http2SecureServerConfigurationIdentity>
|
|
141
|
+
*/
|
|
142
|
+
class Http2SecureServerConfiguration extends ServerConfiguration {
|
|
143
|
+
/**
|
|
144
|
+
* Creates a new {@link Http2SecureServerConfiguration}.
|
|
145
|
+
*
|
|
146
|
+
* @param {Http2SecureServerConfigurationOptions} options - Server configuration options.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```js
|
|
150
|
+
* const configuration = new Http2SecureServerConfiguration({
|
|
151
|
+
* listen: {
|
|
152
|
+
* host: 'localhost',
|
|
153
|
+
* port: 3443,
|
|
154
|
+
* },
|
|
155
|
+
* connection: {
|
|
156
|
+
* cert: './cert.pem',
|
|
157
|
+
* key: './key.pem',
|
|
158
|
+
* },
|
|
159
|
+
* });
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
constructor(options) {
|
|
163
|
+
super({
|
|
164
|
+
...options,
|
|
165
|
+
transport: 'h2',
|
|
166
|
+
protocol: 'https',
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ━━ EXPORT MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
172
|
+
export default Http2SecureServerConfiguration;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* @file Defines the HTTP server configuration.
|
|
4
|
+
*
|
|
5
|
+
* @description Provides the configuration used to create and operate a
|
|
6
|
+
* Node.js HTTP server over an HTTP/1.1 cleartext connection.
|
|
7
|
+
*
|
|
8
|
+
* HttpServerConfiguration defines the server-level configuration for
|
|
9
|
+
* listening, request handling, response handling, static file serving,
|
|
10
|
+
* cross-origin resource sharing, security headers, rate limiting, cookies,
|
|
11
|
+
* CSRF protection, response compression, and the underlying HTTP connection.
|
|
12
|
+
*
|
|
13
|
+
* @module HttpServerConfiguration
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ━━ IMPORT MODULES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
17
|
+
// » IMPORT NATIVE NODEJS MODULES
|
|
18
|
+
|
|
19
|
+
// » IMPORT THIRD PARTY MODULES
|
|
20
|
+
|
|
21
|
+
// » IMPORT LOCAL MODULES
|
|
22
|
+
import ServerConfiguration from '../ServerConfiguration/index.mjs';
|
|
23
|
+
|
|
24
|
+
// ━━ TYPE DEFINITIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
25
|
+
/**
|
|
26
|
+
* HTTP server connection options.
|
|
27
|
+
*
|
|
28
|
+
* @typedef {import('node:http').ServerOptions} HttpConnectionOptions
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Identity of an HTTP/1.1 cleartext server.
|
|
33
|
+
*
|
|
34
|
+
* @typedef {object} HttpServerConfigurationIdentity
|
|
35
|
+
* @property {'http'} protocol - Application-level protocol.
|
|
36
|
+
* @property {'h1'} transport - Transport identifier for HTTP/1.1 cleartext.
|
|
37
|
+
* @property {HttpConnectionOptions} [connection] - HTTP server connection options.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Represents the listen options accepted by the server configuration.
|
|
42
|
+
*
|
|
43
|
+
* @typedef {import('#ServerOptions/ListenOptions').ListenOptionsInput} ListenOptionsInput
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Represents the request options accepted by the server configuration.
|
|
48
|
+
*
|
|
49
|
+
* @typedef {import('#ServerOptions/RequestOptions').RequestOptionsInput} RequestOptionsInput
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Represents the response options accepted by the server configuration.
|
|
54
|
+
*
|
|
55
|
+
* @typedef {import('#ServerOptions/ResponseOptions').ResponseOptionsInput} ResponseOptionsInput
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Represents the static file serving options accepted by the server configuration.
|
|
60
|
+
*
|
|
61
|
+
* @typedef {import('#ServerOptions/StaticOptions').StaticOptionsInput} StaticOptionsInput
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Represents the CORS options accepted by the server configuration.
|
|
66
|
+
*
|
|
67
|
+
* @typedef {import('#ServerOptions/CORSOptions').CORSOptionsInput} CORSOptionsInput
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Represents the security headers options accepted by the server configuration.
|
|
72
|
+
*
|
|
73
|
+
* @typedef {import('#ServerOptions/SecurityHeadersOptions').SecurityHeadersOptionsInput} SecurityHeadersOptionsInput
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Represents the rate limit options accepted by the server configuration.
|
|
78
|
+
*
|
|
79
|
+
* @typedef {import('#ServerOptions/RateLimitOptions').RateLimitOptionsInput} RateLimitOptionsInput
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Represents the cookie parser options accepted by the server configuration.
|
|
84
|
+
*
|
|
85
|
+
* @typedef {import('#ServerOptions/CookieParserOptions').CookieParserOptionsInput} CookieParserOptionsInput
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Represents the cookie session options accepted by the server configuration.
|
|
90
|
+
*
|
|
91
|
+
* @typedef {import('#ServerOptions/CookieSessionOptions').CookieSessionOptionsInput} CookieSessionOptionsInput
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Represents the CSRF options accepted by the server configuration.
|
|
96
|
+
*
|
|
97
|
+
* @typedef {import('#ServerOptions/CSRFOptions').CSRFOptionsInput} CSRFOptionsInput
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Represents the compression options accepted by the server configuration.
|
|
102
|
+
*
|
|
103
|
+
* @typedef {import('#ServerOptions/CompressOptions').CompressOptionsInput} CompressOptionsInput
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Represents the cookie options accepted by the server configuration.
|
|
108
|
+
*
|
|
109
|
+
* @typedef {object} CookieOptionsInput
|
|
110
|
+
* @property {CookieParserOptionsInput} [parser] - Cookie parser configuration.
|
|
111
|
+
* @property {CookieSessionOptionsInput} [session] - Cookie session configuration.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Options accepted by {@link HttpServerConfiguration}.
|
|
116
|
+
*
|
|
117
|
+
* @typedef {object} HttpServerConfigurationOptions
|
|
118
|
+
* @property {HttpConnectionOptions} [connection] - HTTP server connection options.
|
|
119
|
+
* @property {ListenOptionsInput} [listen] - Server listening configuration.
|
|
120
|
+
* @property {RequestOptionsInput} [request] - Request handling configuration.
|
|
121
|
+
* @property {ResponseOptionsInput} [response] - Response handling configuration.
|
|
122
|
+
* @property {StaticOptionsInput} [static] - Static file serving configuration.
|
|
123
|
+
* @property {CORSOptionsInput} [cors] - CORS configuration.
|
|
124
|
+
* @property {SecurityHeadersOptionsInput} [securityHeaders] - Security headers configuration.
|
|
125
|
+
* @property {RateLimitOptionsInput} [rateLimit] - Rate limit configuration.
|
|
126
|
+
* @property {CookieOptionsInput} [cookie] - Cookie configuration.
|
|
127
|
+
* @property {CSRFOptionsInput} [csrf] - CSRF configuration.
|
|
128
|
+
* @property {CompressOptionsInput} [compress] - Compression configuration.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
// ━━ MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
132
|
+
/**
|
|
133
|
+
* Configuration for a Node.js HTTP server operating over HTTP/1.1
|
|
134
|
+
* cleartext.
|
|
135
|
+
*
|
|
136
|
+
* @classdesc HttpServerConfiguration provides the server configuration required
|
|
137
|
+
* to create and operate an HTTP server, including connection, listening,
|
|
138
|
+
* request, response, static file serving, CORS, security headers, rate
|
|
139
|
+
* limiting, cookie, CSRF, and compression options.
|
|
140
|
+
*
|
|
141
|
+
* @augments ServerConfiguration<HttpServerConfigurationIdentity>
|
|
142
|
+
*/
|
|
143
|
+
class HttpServerConfiguration extends ServerConfiguration {
|
|
144
|
+
/**
|
|
145
|
+
* Creates a new {@link HttpServerConfiguration}.
|
|
146
|
+
*
|
|
147
|
+
* @param {HttpServerConfigurationOptions} options - Server configuration options.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```js
|
|
151
|
+
* const configuration = new HttpServerConfiguration({
|
|
152
|
+
* listen: {
|
|
153
|
+
* host: 'localhost',
|
|
154
|
+
* port: 3000,
|
|
155
|
+
* },
|
|
156
|
+
* });
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
constructor(options) {
|
|
160
|
+
super({
|
|
161
|
+
...options,
|
|
162
|
+
transport: 'h1',
|
|
163
|
+
protocol: 'http',
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// ━━ EXPORT MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
169
|
+
export default HttpServerConfiguration;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* @file Defines the HTTPS server configuration.
|
|
4
|
+
*
|
|
5
|
+
* @description Provides the configuration used to create and operate a
|
|
6
|
+
* Node.js HTTPS server over an HTTP/1.1 TLS connection.
|
|
7
|
+
*
|
|
8
|
+
* HttpsServerConfiguration defines the server-level configuration for
|
|
9
|
+
* listening, request handling, response handling, static file serving,
|
|
10
|
+
* cross-origin resource sharing, security headers, rate limiting, cookies,
|
|
11
|
+
* CSRF protection, response compression, and the underlying HTTPS connection.
|
|
12
|
+
*
|
|
13
|
+
* @module HttpsServerConfiguration
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ━━ IMPORT MODULES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
17
|
+
// » IMPORT NATIVE NODEJS MODULES
|
|
18
|
+
|
|
19
|
+
// » IMPORT THIRD PARTY MODULES
|
|
20
|
+
|
|
21
|
+
// » IMPORT LOCAL MODULES
|
|
22
|
+
import ServerConfiguration from '../ServerConfiguration/index.mjs';
|
|
23
|
+
|
|
24
|
+
// ━━ TYPE DEFINITIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
25
|
+
/**
|
|
26
|
+
* HTTPS server connection options.
|
|
27
|
+
*
|
|
28
|
+
* @typedef {import('node:https').ServerOptions} HttpsConnectionOptions
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Identity of an HTTP/1.1 over TLS server.
|
|
33
|
+
*
|
|
34
|
+
* @typedef {object} HttpsServerConfigurationIdentity
|
|
35
|
+
* @property {'https'} protocol - Application-level protocol.
|
|
36
|
+
* @property {'h1s'} transport - Transport identifier for HTTP/1.1 over TLS.
|
|
37
|
+
* @property {HttpsConnectionOptions} [connection] - HTTPS server connection options.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Represents the listen options accepted by the server configuration.
|
|
42
|
+
*
|
|
43
|
+
* @typedef {import('#ServerOptions/ListenOptions').ListenOptionsInput} ListenOptionsInput
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Represents the request options accepted by the server configuration.
|
|
48
|
+
*
|
|
49
|
+
* @typedef {import('#ServerOptions/RequestOptions').RequestOptionsInput} RequestOptionsInput
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Represents the response options accepted by the server configuration.
|
|
54
|
+
*
|
|
55
|
+
* @typedef {import('#ServerOptions/ResponseOptions').ResponseOptionsInput} ResponseOptionsInput
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Represents the static file serving options accepted by the server configuration.
|
|
60
|
+
*
|
|
61
|
+
* @typedef {import('#ServerOptions/StaticOptions').StaticOptionsInput} StaticOptionsInput
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Represents the CORS options accepted by the server configuration.
|
|
66
|
+
*
|
|
67
|
+
* @typedef {import('#ServerOptions/CORSOptions').CORSOptionsInput} CORSOptionsInput
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Represents the security headers options accepted by the server configuration.
|
|
72
|
+
*
|
|
73
|
+
* @typedef {import('#ServerOptions/SecurityHeadersOptions').SecurityHeadersOptionsInput} SecurityHeadersOptionsInput
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Represents the rate limit options accepted by the server configuration.
|
|
78
|
+
*
|
|
79
|
+
* @typedef {import('#ServerOptions/RateLimitOptions').RateLimitOptionsInput} RateLimitOptionsInput
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Represents the cookie parser options accepted by the server configuration.
|
|
84
|
+
*
|
|
85
|
+
* @typedef {import('#ServerOptions/CookieParserOptions').CookieParserOptionsInput} CookieParserOptionsInput
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Represents the cookie session options accepted by the server configuration.
|
|
90
|
+
*
|
|
91
|
+
* @typedef {import('#ServerOptions/CookieSessionOptions').CookieSessionOptionsInput} CookieSessionOptionsInput
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Represents the CSRF options accepted by the server configuration.
|
|
96
|
+
*
|
|
97
|
+
* @typedef {import('#ServerOptions/CSRFOptions').CSRFOptionsInput} CSRFOptionsInput
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Represents the compression options accepted by the server configuration.
|
|
102
|
+
*
|
|
103
|
+
* @typedef {import('#ServerOptions/CompressOptions').CompressOptionsInput} CompressOptionsInput
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Represents the cookie options accepted by the server configuration.
|
|
108
|
+
*
|
|
109
|
+
* @typedef {object} CookieOptionsInput
|
|
110
|
+
* @property {CookieParserOptionsInput} [parser] - Cookie parser configuration.
|
|
111
|
+
* @property {CookieSessionOptionsInput} [session] - Cookie session configuration.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Options accepted by {@link HttpsServerConfiguration}.
|
|
116
|
+
*
|
|
117
|
+
* @typedef {object} HttpsServerConfigurationOptions
|
|
118
|
+
* @property {HttpsConnectionOptions} [connection] - HTTPS server connection options.
|
|
119
|
+
* @property {ListenOptionsInput} [listen] - Server listening configuration.
|
|
120
|
+
* @property {RequestOptionsInput} [request] - Request handling configuration.
|
|
121
|
+
* @property {ResponseOptionsInput} [response] - Response handling configuration.
|
|
122
|
+
* @property {StaticOptionsInput} [static] - Static file serving configuration.
|
|
123
|
+
* @property {CORSOptionsInput} [cors] - CORS configuration.
|
|
124
|
+
* @property {SecurityHeadersOptionsInput} [securityHeaders] - Security headers configuration.
|
|
125
|
+
* @property {RateLimitOptionsInput} [rateLimit] - Rate limit configuration.
|
|
126
|
+
* @property {CookieOptionsInput} [cookie] - Cookie configuration.
|
|
127
|
+
* @property {CSRFOptionsInput} [csrf] - CSRF configuration.
|
|
128
|
+
* @property {CompressOptionsInput} [compress] - Compression configuration.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
// ━━ MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
132
|
+
/**
|
|
133
|
+
* Configuration for a Node.js HTTPS server operating over HTTP/1.1 TLS.
|
|
134
|
+
*
|
|
135
|
+
* @classdesc HttpsServerConfiguration provides the server configuration required
|
|
136
|
+
* to create and operate an HTTPS server, including connection, listening,
|
|
137
|
+
* request, response, static file serving, CORS, security headers, rate
|
|
138
|
+
* limiting, cookie, CSRF, and compression options.
|
|
139
|
+
*
|
|
140
|
+
* @augments ServerConfiguration<HttpsServerConfigurationIdentity>
|
|
141
|
+
*/
|
|
142
|
+
class HttpsServerConfiguration extends ServerConfiguration {
|
|
143
|
+
/**
|
|
144
|
+
* Creates a new {@link HttpsServerConfiguration}.
|
|
145
|
+
*
|
|
146
|
+
* @param {HttpsServerConfigurationOptions} options - Server configuration options.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```js
|
|
150
|
+
* const configuration = new HttpsServerConfiguration({
|
|
151
|
+
* listen: {
|
|
152
|
+
* host: 'localhost',
|
|
153
|
+
* port: 3443,
|
|
154
|
+
* },
|
|
155
|
+
* connection: {
|
|
156
|
+
* cert: './cert.pem',
|
|
157
|
+
* key: './key.pem',
|
|
158
|
+
* },
|
|
159
|
+
* });
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
constructor(options) {
|
|
163
|
+
super({
|
|
164
|
+
...options,
|
|
165
|
+
transport: 'h1s',
|
|
166
|
+
protocol: 'https',
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ━━ EXPORT MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
172
|
+
export default HttpsServerConfiguration;
|