Add per-host gzip, asset cache TTL, and HTTP/3 controls - #5803
Add per-host gzip, asset cache TTL, and HTTP/3 controls#5803RentnerKev wants to merge 6 commits into
Conversation
|
Docker Image for build 5 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
|
Thanks for your PR and for taking the time to contribute! To make the review process easier, I’d recommend splitting this into several smaller, more focused PRs — at least one for Gzip, one for asset caching, and one for HTTP/3. Keeping each PR focused on a single topic will make the changes much easier to understand, review, test, and discuss. Thanks again for your contribution |
|
Thanks for the feedback. I have split this into three separate PRs, each targeting
Each PR includes its own migration, API/UI changes, and focused tests. The branches were validated individually and together in a temporary integration checkout; details and test limitations are documented in each PR. I am closing this combined PR in favor of those three focused PRs. The original branch and discussion remain available for reference. |
Why
Issue #5448 requests first-class UI controls for gzip compression and configurable asset cache lifetimes.
Currently, gzip settings and custom cache durations require manual directives in the Advanced configuration field. This is less convenient, error-prone, and difficult to manage consistently across Proxy Hosts.
This PR adds these settings directly to the Proxy Host UI and also adds independent HTTP/2 and HTTP/3/QUIC controls. HTTP/1.1 remains available as the default fallback.
The API changes are additive and backward compatible:
Closes #5448
Closes #1550
Closes #2834
Related to #5690: this PR also serializes Nginx configuration lifecycle
operations and adds safeguards against stale host configurations being recreated.
Type of Change
AI Usage
What Changed
Gzip compression
gzip offwhen disabledAsset caching
HTTP protocols
Alt-SvchandlingNPM_PUBLIC_HTTPS_PORTConfiguration safety
Backward Compatibility
All new database fields have defaults matching the existing behavior. Existing API clients can continue operating without sending the new fields.
HTTP/3 remains opt-in and does not create a QUIC listener unless at least one eligible Proxy Host enables it.
Testing
The following checks passed:
nginx -tDeployment Note
HTTP/3 requires the HTTPS port to be available through both TCP and UDP. Docker and firewall configurations must therefore allow:
443/tcp443/udpWhen a different external HTTPS port is used,
NPM_PUBLIC_HTTPS_PORTshould be configured so the generatedAlt-Svcheader advertises the correct port.Related Work
I am aware that #5587 also implements HTTP/3 support. This implementation additionally includes per-host protocol controls, persistent UDP 443 allocation, Stream conflict detection, manual QUIC listener detection, public port handling, and serialized Nginx configuration lifecycle operations.
If preferred by the maintainers, the HTTP/3 portion can be separated so that the gzip and cache lifetime changes remain focused on #5448.