mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-03 08:45:55 +03:00
don't autofill servers if FQDNs passed in
This commit is contained in:
@@ -80,7 +80,10 @@ func (h *Http) Run(ctx context.Context) error {
|
||||
h.gzipHandler(),
|
||||
)
|
||||
|
||||
h.SSLConfig.FQDNs = h.Servers() // fill all servers
|
||||
if len(h.SSLConfig.FQDNs) == 0 {
|
||||
h.SSLConfig.FQDNs = h.Servers() // fill all discovered if nothing defined
|
||||
}
|
||||
|
||||
switch h.SSLConfig.SSLMode {
|
||||
case SSLNone:
|
||||
log.Printf("[INFO] activate http proxy server on %s", h.Address)
|
||||
@@ -104,6 +107,7 @@ func (h *Http) Run(ctx context.Context) error {
|
||||
return httpServer.ListenAndServeTLS(h.SSLConfig.Cert, h.SSLConfig.Key)
|
||||
case SSLAuto:
|
||||
log.Printf("[INFO] activate https server in 'auto' mode on %s", h.Address)
|
||||
log.Printf("[DEBUG] FQDNs %v", h.SSLConfig.FQDNs)
|
||||
|
||||
m := h.makeAutocertManager()
|
||||
httpsServer = h.makeHTTPSAutocertServer(h.Address, handler, m)
|
||||
|
||||
Reference in New Issue
Block a user