(host string)
| 213 | } |
| 214 | |
| 215 | func (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 | |
| 227 | var hopHeaders = []string{ |
| 228 | "Connection", "Keep-Alive", "Proxy-Authenticate", |
no test coverage detected