(addr string)
| 81 | } |
| 82 | |
| 83 | func checkHTTPSOrLoopback(addr string) error { |
| 84 | if addr == "" { |
| 85 | return nil |
| 86 | } |
| 87 | u, err := url.Parse(addr) |
| 88 | if err != nil { |
| 89 | return err |
| 90 | } |
| 91 | if !util.IsLoopback(u.Host) && u.Scheme != "https" { |
| 92 | return fmt.Errorf("URL %q does not use HTTPS or is not a loopback address", addr) |
| 93 | } |
| 94 | return nil |
| 95 | } |
no test coverage detected
searching dependent graphs…