parameter for turning off nextJS compression
Description
add a bool parameter called next_compression allowing to turn off the NextJS Gzip compression
The compression is still turned on by default for better performance.
Checklist
- [x] Have you followed the guidelines stated in CONTRIBUTING.md file?
- [x] Have you checked to ensure there aren't any other open Pull Requests for the desired changed?
Type of change
- [x] New feature (non-breaking change which adds functionality)
- [x] This change requires a documentation update
New Feature Submission:
- [x] Does your submission pass the tests?
- [x] Have you linted your code locally prior to submission?
The use case is when you have a reverse proxy (Nginx, Apache, others...) between your nextjs serveur and your visitors.
If you want the compression to be done by the reverse proxy instead of NextJS, you have to turn it off in next.config.json
(see the Compression paragraph in my PR on self-hosting in the docs)
It's a niche parameter, but it's necessary if any user want some level of control over how the nextJS server is running.
(We could eventually generalize it by passing a dict of NextJS parameters rather than specific ones like that.)