Commit f4c9a733 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Option to disable letsencrypt

parent ce2245e2
Pipeline #20213 passed with stage
in 35 seconds
......@@ -23,11 +23,12 @@ const haproxySSLDir = "/etc/haproxy/ssl/"
const haproxyConfigFile = "/etc/haproxy/haproxy.cfg"
type siteInfo struct {
Name string `json:"name"`
Domain string `json:"domain"`
SSL sslCertInfo
Backends []siteBackendInfo `json:"backends"`
Routes []siteRouteInfo `json:"routes"`
Name string `json:"name"`
Domain string `json:"domain"`
DisableLetsEncrypt bool `json:"disable_letsencrypt"`
SSL sslCertInfo
Backends []siteBackendInfo `json:"backends"`
Routes []siteRouteInfo `json:"routes"`
}
type letsEncryptInfo struct {
......@@ -377,6 +378,9 @@ func (p *ProxyServer) updateSslCerts() (bool, error) {
newCertURL := fmt.Sprintf("http://%s:%d/new-cert", p.LetsEncrypt.Master.Host, p.LetsEncrypt.Master.Port)
for _, site := range p.Sites {
if site.DisableLetsEncrypt {
continue
}
sslCertInfo := p.sslCerts[site.Domain]
if sslCertInfo.Valid {
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment