nginx-proxy-manager/docs
Tom Winnerl f992f5e6f7 fix(review): test a disabled host as it runs once enabled
The config test of an existing host merges the payload over the stored
row, so a disabled host kept enabled: false (the form never sends
enabled). The host templates wrap the whole server block in
{% if enabled %}, so the dry run checked an empty file and nginx -t
passed whatever the host contained: a disabled proxy host with an
unknown directive in its advanced config got "Configuration OK" and
then failed as soon as it was enabled. A new host only defaulted to
enabled when the payload left it out.

buildHost() now always returns the host with enabled: true
(asEnabled(), the same rule buildTestTargets() already used for the
reachability checks, now shared). The host is a copy that is only
rendered, never saved: the stored row stays disabled and dryRun() puts
its previous (empty) config file back.

Tests: test() of a stored disabled proxy host and of a new host sent
with enabled: false hand an enabled host to the dry run while the row
stays disabled; buildHost() does not change the row it builds on;
asEnabled() returns a copy. The HostConfigTest Cypress spec disables a
proxy host, tests it with an unknown directive (ok: false) and without
(ok: true), and checks that it stays disabled and is not served. The
docs mention it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:03:56 +01:00
..
.vitepress docs: upstream discovery page 2026-11-14 09:03:56 +01:00
scripts Docs update, use package version instead of latest, refer to better mariadb image 2026-02-19 08:36:41 +10:00
src fix(review): test a disabled host as it runs once enabled 2026-11-14 09:03:56 +01:00
.gitignore Migrate from vuepress to vitepress for docs site 2024-05-10 23:00:27 +10:00
package.json Docs update, use package version instead of latest, refer to better mariadb image 2026-02-19 08:36:41 +10:00
yarn.lock Update dependencies 2026-11-09 11:55:20 +10:00