(req *http.Request)
| 3 | import "net/http" |
| 4 | |
| 5 | func isDirectRequest(req *http.Request) bool { |
| 6 | if req == nil || req.URL == nil || req.Method == http.MethodConnect || req.Method == "GETRANDOM" { |
| 7 | return false |
| 8 | } |
| 9 | |
| 10 | return req.URL.Scheme == "" && req.URL.Host == "" |
| 11 | } |
no outgoing calls