Skip to content

Add per-proxy-host gzip controls - #5816

Open
RentnerKev wants to merge 1 commit into
NginxProxyManager:developfrom
RentnerKev:rentner/proxy-host-gzip
Open

Add per-proxy-host gzip controls#5816
RentnerKev wants to merge 1 commit into
NginxProxyManager:developfrom
RentnerKev:rentner/proxy-host-gzip

Conversation

@RentnerKev

@RentnerKev RentnerKev commented Aug 30, 2026

Copy link
Copy Markdown

Why

Issue #5448 requests per-Proxy-Host gzip controls without manual Advanced configuration directives.

This is the gzip portion of #5803, split out following the maintainer's request. It targets develop independently and does not include configurable cache lifetimes or HTTP/3. It addresses the gzip part of #5448; the caching part is submitted separately in #5815. The HTTP/3 portion is in #5817.

What Changed

  • Add a gzip toggle, compression levels 1–9, and selection of additional MIME types.
  • Generate gzip off explicitly when compression is disabled; omit the additional MIME directive for an empty selection.
  • Default to gzip enabled, level 1, and no additional MIME types for existing and new hosts.
  • Add three optional API fields with bounded levels and an allowlist of MIME types.
  • Include a dedicated migration, model handling for the MIME array, OpenAPI definitions/examples, translations, and focused backend, frontend, and API tests.

Existing clients can omit the new fields. There are no removed or renamed fields, and no cache, listener, UDP-port, or Nginx lifecycle changes.

Validation

  • Backend tests: 3 passed; full frontend suite: 12 passed.
  • Backend/frontend lint, OpenAPI validation, locale compilation, TypeScript, and production frontend build passed.
  • Fresh isolated Linux/SQLite setup: all 20 migrations passed; persisted model defaults and absence of unrelated feature columns verified.
  • SQLite upgrade/rollback and schema-boundary checks passed, including rejection of invalid levels, duplicate MIME types, and directive injection.
  • Real Nginx configuration and HTTP checks verified compressed payloads, custom locations, MIME selection, an empty MIME selection, and disabling gzip.
  • Feature-specific Cypress API scenarios are included; the full Cypress CI stack was not rerun locally.

The Windows frontend test run used NODE_OPTIONS=--no-experimental-webstorage with Node 26. The runtime checks used the project's nginxproxymanager/nginx-full:certbot-node image with Node 22.

A temporary combined checkout of all three split changes also passed 13 backend tests, 13 frontend tests, the frontend build, all 22 migrations, and the Nginx runtime checks after resolving the shared insertion points.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • API changes
  • Performance improvement
  • Test addition or update

AI Usage

  • AI was used to write this
  • AI was used to review this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant