@adonisjs/http-server 7.3.0 → 7.5.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.
|
@@ -88,25 +88,29 @@ var BriskRoute = class extends Macroable {
|
|
|
88
88
|
* be used when no custom params are defined.
|
|
89
89
|
*/
|
|
90
90
|
redirect(identifier, params, options) {
|
|
91
|
-
|
|
91
|
+
function redirectsToRoute(ctx) {
|
|
92
92
|
const redirector = ctx.response.redirect();
|
|
93
93
|
if (options?.status) {
|
|
94
94
|
redirector.status(options.status);
|
|
95
95
|
}
|
|
96
96
|
return redirector.toRoute(identifier, params || ctx.params, options);
|
|
97
|
-
}
|
|
97
|
+
}
|
|
98
|
+
Object.defineProperty(redirectsToRoute, "listArgs", { value: identifier, writable: false });
|
|
99
|
+
return this.setHandler(redirectsToRoute);
|
|
98
100
|
}
|
|
99
101
|
/**
|
|
100
102
|
* Redirect request to a fixed URL
|
|
101
103
|
*/
|
|
102
104
|
redirectToPath(url, options) {
|
|
103
|
-
|
|
105
|
+
function redirectsToPath(ctx) {
|
|
104
106
|
const redirector = ctx.response.redirect();
|
|
105
107
|
if (options?.status) {
|
|
106
108
|
redirector.status(options.status);
|
|
107
109
|
}
|
|
108
110
|
return redirector.toPath(url);
|
|
109
|
-
}
|
|
111
|
+
}
|
|
112
|
+
Object.defineProperty(redirectsToPath, "listArgs", { value: url, writable: false });
|
|
113
|
+
return this.setHandler(redirectsToPath);
|
|
110
114
|
}
|
|
111
115
|
};
|
|
112
116
|
|
|
@@ -2340,7 +2344,7 @@ var Response = class extends Macroable6 {
|
|
|
2340
2344
|
* - Buffer
|
|
2341
2345
|
*/
|
|
2342
2346
|
#getDataType(content) {
|
|
2343
|
-
if (
|
|
2347
|
+
if (content instanceof Uint8Array) {
|
|
2344
2348
|
return "buffer";
|
|
2345
2349
|
}
|
|
2346
2350
|
if (content instanceof Date) {
|
|
@@ -4422,6 +4426,10 @@ var Server = class {
|
|
|
4422
4426
|
* Set the HTTP server instance used to listen for requests.
|
|
4423
4427
|
*/
|
|
4424
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;
|
|
4425
4433
|
this.#nodeHttpServer = server;
|
|
4426
4434
|
}
|
|
4427
4435
|
/**
|
|
@@ -4562,4 +4570,4 @@ export {
|
|
|
4562
4570
|
Server,
|
|
4563
4571
|
defineConfig
|
|
4564
4572
|
};
|
|
4565
|
-
//# sourceMappingURL=chunk-
|
|
4573
|
+
//# sourceMappingURL=chunk-PCV5MT2U.js.map
|