MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / rejectAccess

Method rejectAccess

handler/handler.go:278–285  ·  view source on GitHub ↗
(wr http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

276}
277
278func (s *ProxyHandler) rejectAccess(wr http.ResponseWriter, req *http.Request) {
279 if s.accessReject == nil {
280 http.Error(wr, "Access denied", http.StatusForbidden)
281 return
282 }
283
284 s.reject(s.accessReject, wr, req)
285}
286
287func (s *ProxyHandler) reject(reject auth.Auth, wr http.ResponseWriter, req *http.Request) {
288 _, _ = reject.Validate(req.Context(), wr, req)

Callers 2

HandleTunnelMethod · 0.95
HandleRequestMethod · 0.95

Calls 2

rejectMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected