Files
nginx-proxy-manager/backend
adman234andClaude Sonnet 5 ba60a9afa5 Fix: SSL toggles (Force SSL, HTTP/2, HSTS) reset to off when requesting a new certificate on host creation
When creating a Proxy Host, Redirection Host, or 404 Host and requesting
a brand new Let's Encrypt certificate in the same submission, the
ssl_forced/http2_support/hsts_enabled/hsts_subdomains fields the user
enabled on the form were silently discarded and saved as false.

Root cause: certificate_id is deleted from the payload before the
initial insert (since "new" is not a real certificate id yet), so
cleanSslHstsData() sees no certificate_id and zeroes the SSL toggles
under its "no cert means SSL can't be forced" invariant - even though
a certificate is about to be created moments later in the same
request. The follow-up update() call that attaches the freshly
created certificate_id only passed { id, certificate_id }, so the
user's original toggle values were never re-applied.

Fix: skip the premature cleanSslHstsData() zeroing during the initial
insert when a certificate is being created, and forward the originally
submitted ssl_forced/http2_support/hsts_enabled/hsts_subdomains values
in the follow-up update() call, once the real certificate exists to
validate them against.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 10:33:24 -05:00
..
2026-05-27 07:25:24 +10:00
2026-05-13 13:40:06 +10:00
2026-05-25 07:37:24 +10:00
2026-05-25 07:37:24 +10:00
2026-03-03 08:44:42 +10:00
2025-10-02 08:10:18 +10:00
2026-06-04 15:08:31 +02:00
2025-10-02 08:10:18 +10:00