GetReqMeta returns the metadata of the request
(req *http.Request)
| 168 | |
| 169 | // GetReqMeta returns the metadata of the request |
| 170 | func GetReqMeta(req *http.Request) map[string]string { |
| 171 | reqMeta := map[string]string{} |
| 172 | if req != nil { |
| 173 | // get request metadata |
| 174 | reqMeta = map[string]string{ |
| 175 | "method": req.Method, |
| 176 | "url": req.URL.String(), |
| 177 | "host": req.Host, |
| 178 | } |
| 179 | } |
| 180 | return reqMeta |
| 181 | } |
| 182 | |
| 183 | func IsPassThrough(logger *zap.Logger, req *http.Request, destPort uint, opts models.OutgoingOptions) bool { |
| 184 | passThrough := false |
no test coverage detected