mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-11-21 23:50:39 +00:00
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>
|
||
|---|---|---|
| .. | ||
| .vitepress | ||
| scripts | ||
| src | ||
| .gitignore | ||
| package.json | ||
| yarn.lock | ||