Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow passing http serverOptions from config #18591

Merged
merged 4 commits into from
Nov 6, 2023

Conversation

innerdvations
Copy link
Contributor

@innerdvations innerdvations commented Oct 26, 2023

What does it do?

Allows user to set http server configuration options

Why is it needed?

The specific issue is that Strapi can no longer accept any file uploads that take longer than the default Node 18+ http server requestTimeout, which is 5 minutes.

This allows users to configure that setting to be whatever value they wish.

In addition to that, users will now be able to configure any option available in http.ServerOptions

How to test it?

Try setting some values in config/server.ts http.serverOptions and see that they are passed through to the http.createServer

Related issue(s)/PR(s)

Fixes #18543

Documentation PR

@innerdvations innerdvations added source: core:strapi Source is core/strapi package pr: feature This PR adds a new feature labels Oct 26, 2023
@innerdvations innerdvations self-assigned this Oct 26, 2023
derrickmehaffy
derrickmehaffy previously approved these changes Oct 26, 2023
Copy link
Member

@derrickmehaffy derrickmehaffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it

@innerdvations
Copy link
Contributor Author

Love it

I do too, I think it would provide a lot of solutions to edge cases, and if we like this, I will probably do the same for Koa, Apollo, and any other external modules we use. We already do it with Knex.

Ultimately however this is a philosophical question that I'll need to wait for a consensus on before we can merge.

Marc-Roig
Marc-Roig previously approved these changes Oct 27, 2023
@innerdvations innerdvations merged commit 87431e4 into main Nov 6, 2023
139 checks passed
@innerdvations innerdvations deleted the feat/config-http-server-timeouts branch November 6, 2023 14:31
@innerdvations innerdvations modified the milestones: 4.15.3, 4.15.2 Nov 8, 2023
@joshuaellis joshuaellis modified the milestones: 4.15.2, 4.15.5 Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: feature This PR adds a new feature source: core:strapi Source is core/strapi package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

408 on large request upload
5 participants