MCPcopy Create free account
hub / github.com/buggregator/server / certForHost

Method certForHost

modules/proxy/server.go:215–225  ·  view source on GitHub ↗
(host string)

Source from the content-addressed store, hash-verified

213}
214
215func (s *proxyServer) certForHost(host string) (*tls.Certificate, error) {
216 if cached, ok := s.certCache.Load(host); ok {
217 return cached.(*tls.Certificate), nil
218 }
219 cert, err := generateHostCert(s.ca, host)
220 if err != nil {
221 return nil, err
222 }
223 s.certCache.Store(host, cert)
224 return cert, nil
225}
226
227var hopHeaders = []string{
228 "Connection", "Keep-Alive", "Proxy-Authenticate",

Callers 1

handleConnectMethod · 0.95

Calls 2

generateHostCertFunction · 0.85
StoreMethod · 0.65

Tested by

no test coverage detected