diff --git a/www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy/Caddy.xml b/www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy/Caddy.xml index f544f3c9b..d482aa4ba 100644 --- a/www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy/Caddy.xml +++ b/www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy/Caddy.xml @@ -290,8 +290,24 @@ 100 Please enter a value between 1 to 100. - - + + + + TLS and NTLM must be enabled at the same time. + DependConstraint + + HttpNtlm + + + + + + + + HttpNtlm.check001 + + + ca diff --git a/www/caddy/src/opnsense/service/templates/OPNsense/Caddy/Caddyfile b/www/caddy/src/opnsense/service/templates/OPNsense/Caddy/Caddyfile index c162a0bfd..7aa75d1dc 100644 --- a/www/caddy/src/opnsense/service/templates/OPNsense/Caddy/Caddyfile +++ b/www/caddy/src/opnsense/service/templates/OPNsense/Caddy/Caddyfile @@ -523,34 +523,36 @@ {% if handle.PassiveHealthFailDuration|default("") %} fail_duration {{ handle.PassiveHealthFailDuration }}s {% endif %} - {% if handle.HttpTls|default("0") == "1" or handle.HttpTlsInsecureSkipVerify|default("0") == "1" %} + {% if handle.HttpTls|default("0") == "1" or handle.HttpTlsInsecureSkipVerify|default("0") == "1" or handle.HttpTlsTrustedCaCerts|default("") != "" or handle.HttpTlsServerName|default("") != "" %} {% if handle.HttpNtlm|default("0") == "1" %} transport http_ntlm { + {% if handle.HttpTls|default("0") == "1" %} + tls + {% endif %} {% if handle.HttpTlsInsecureSkipVerify|default("0") == "1" %} tls_insecure_skip_verify - {% else %} - tls + {% endif %} {% if handle.HttpTlsTrustedCaCerts %} tls_trusted_ca_certs /var/db/caddy/data/caddy/certificates/temp/{{ handle.HttpTlsTrustedCaCerts }}.pem {% endif %} {% if handle.HttpTlsServerName %} tls_server_name {{ handle.HttpTlsServerName }} {% endif %} - {% endif %} } {% else %} transport http { + {% if handle.HttpTls|default("0") == "1" %} + tls + {% endif %} {% if handle.HttpTlsInsecureSkipVerify|default("0") == "1" %} tls_insecure_skip_verify - {% else %} - tls + {% endif %} {% if handle.HttpTlsTrustedCaCerts %} tls_trusted_ca_certs /var/db/caddy/data/caddy/certificates/temp/{{ handle.HttpTlsTrustedCaCerts }}.pem {% endif %} {% if handle.HttpTlsServerName %} tls_server_name {{ handle.HttpTlsServerName }} {% endif %} - {% endif %} } {% endif %} {% endif %}