How can I use a config template to add cert validations hosts to a wan target?
February 28, 2024
Since validation hosts can vary, there is a button just above the certificates scaffold that will add the URLs of the sites used to validate the certificates to a wan target called: Certificate Validation Hosts. However, if you want to accomplish the same thing using a configuration template, you can add the following to the template:
--- - SslKeyChain: <% wts = SslKeyChain.all.map(&:add_cert_validation_hosts_to_wan_target).compact if wt = wts.last wt.captive_portals = CaptivePortal.all end %>
This WAN target should then be attached to the captive portal that clients are behind when joining the network. This allows the client devices to validate the authenticity of the certificate on the rXg.