@adonisjs/http-server 7.4.0 → 7.6.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/build/{chunk-FABGS5HW.js → chunk-7AGINHO3.js} +10 -5
- package/build/chunk-7AGINHO3.js.map +1 -0
- package/build/factories/main.js +1 -1
- package/build/index.js +1 -1
- package/build/src/define_config.d.ts +4 -1
- package/build/src/types/server.d.ts +25 -0
- package/package.json +28 -28
- package/build/chunk-FABGS5HW.js.map +0 -1
|
@@ -2344,7 +2344,7 @@ var Response = class extends Macroable6 {
|
|
|
2344
2344
|
* - Buffer
|
|
2345
2345
|
*/
|
|
2346
2346
|
#getDataType(content) {
|
|
2347
|
-
if (
|
|
2347
|
+
if (content instanceof Uint8Array) {
|
|
2348
2348
|
return "buffer";
|
|
2349
2349
|
}
|
|
2350
2350
|
if (content instanceof Date) {
|
|
@@ -4426,6 +4426,10 @@ var Server = class {
|
|
|
4426
4426
|
* Set the HTTP server instance used to listen for requests.
|
|
4427
4427
|
*/
|
|
4428
4428
|
setNodeServer(server) {
|
|
4429
|
+
server.timeout = this.#config.timeout ?? server.timeout;
|
|
4430
|
+
server.keepAliveTimeout = this.#config.keepAliveTimeout ?? server.keepAliveTimeout;
|
|
4431
|
+
server.headersTimeout = this.#config.headersTimeout ?? server.headersTimeout;
|
|
4432
|
+
server.requestTimeout = this.#config.requestTimeout ?? server.requestTimeout;
|
|
4429
4433
|
this.#nodeHttpServer = server;
|
|
4430
4434
|
}
|
|
4431
4435
|
/**
|
|
@@ -4495,9 +4499,10 @@ var Server = class {
|
|
|
4495
4499
|
// src/define_config.ts
|
|
4496
4500
|
import proxyAddr from "proxy-addr";
|
|
4497
4501
|
import string3 from "@poppinss/utils/string";
|
|
4502
|
+
import lodash3 from "@poppinss/utils/lodash";
|
|
4498
4503
|
function defineConfig(config) {
|
|
4499
4504
|
const { trustProxy: trustProxy2, ...rest } = config;
|
|
4500
|
-
const
|
|
4505
|
+
const defaults = {
|
|
4501
4506
|
allowMethodSpoofing: false,
|
|
4502
4507
|
trustProxy: proxyAddr.compile("loopback"),
|
|
4503
4508
|
subdomainOffset: 2,
|
|
@@ -4526,9 +4531,9 @@ function defineConfig(config) {
|
|
|
4526
4531
|
arrayFormat: "indices",
|
|
4527
4532
|
skipNulls: false
|
|
4528
4533
|
}
|
|
4529
|
-
}
|
|
4530
|
-
...rest
|
|
4534
|
+
}
|
|
4531
4535
|
};
|
|
4536
|
+
const normalizedConfig = lodash3.merge({}, defaults, rest);
|
|
4532
4537
|
if (normalizedConfig.cookie.maxAge) {
|
|
4533
4538
|
normalizedConfig.cookie.maxAge = string3.seconds.parse(normalizedConfig.cookie.maxAge);
|
|
4534
4539
|
}
|
|
@@ -4566,4 +4571,4 @@ export {
|
|
|
4566
4571
|
Server,
|
|
4567
4572
|
defineConfig
|
|
4568
4573
|
};
|
|
4569
|
-
//# sourceMappingURL=chunk-
|
|
4574
|
+
//# sourceMappingURL=chunk-7AGINHO3.js.map
|