rename url flag to domain and update validation

This commit is contained in:
mlsmaycon
2026-02-12 16:28:29 +01:00
parent 41a5509ce0
commit ac995bae6d
3 changed files with 22 additions and 33 deletions

View File

@@ -218,12 +218,6 @@ func (s *Server) ListenAndServe(ctx context.Context, addr string) (err error) {
}()
tlsConfig = s.acme.TLSConfig()
// If the ProxyURL is not set, then fallback to the server address.
// Hopefully that should give at least something that we can use.
// If it doesn't, then autocert probably won't work correctly.
if s.ProxyURL == "" {
s.ProxyURL, _, _ = net.SplitHostPort(addr)
}
// ServerName needs to be set to allow for ACME to work correctly
// when using CNAME URLs to access the proxy.
tlsConfig.ServerName = s.ProxyURL