MCPcopy Index your code
hub / github.com/SenseUnit/dumbproxy / isLoopback

Method isLoopback

handler/handler.go:221–226  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

219}
220
221func (s *ProxyHandler) isLoopback(req *http.Request) (string, bool) {
222 s.outboundMux.RLock()
223 originator, found := s.outbound[req.RemoteAddr]
224 s.outboundMux.RUnlock()
225 return originator, found
226}
227
228func (s *ProxyHandler) ServeHTTP(wr http.ResponseWriter, req *http.Request) {
229 if originator, isLoopback := s.isLoopback(req); isLoopback {

Callers 1

ServeHTTPMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected