mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 23:24:03 +00:00
feat: allow passing http serverOptions from config (#18591)
This commit is contained in:
parent
84033819f8
commit
87431e44c3
@ -21,4 +21,9 @@ module.exports = ({ env }) => ({
|
||||
},
|
||||
// ℹ️ http_proxy is the env var used by system to set proxy globally
|
||||
globalProxy: env('http_proxy'),
|
||||
http: {
|
||||
serverOptions: {
|
||||
requestTimeout: 1000 * 60 * 10, // set request timeout to 600000ms (10 minutes)
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -20,7 +20,9 @@ const createHTTPServer = (strapi: Strapi, koaApp: Koa): Server => {
|
||||
return handler(req, res);
|
||||
};
|
||||
|
||||
const server: http.Server = http.createServer(listener);
|
||||
const options = strapi.config.get<http.ServerOptions>('server.http.serverOptions', {});
|
||||
|
||||
const server: http.Server = http.createServer(options, listener);
|
||||
|
||||
server.on('connection', (connection) => {
|
||||
connections.add(connection);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user