MCPcopy
hub / github.com/fagongzi/manba / Pre

Method Pre

pkg/proxy/filter_validation.go:35–41  ·  view source on GitHub ↗

Pre pre filter, before proxy reuqest

(c filter.Context)

Source from the content-addressed store, hash-verified

33
34// Pre pre filter, before proxy reuqest
35func (f *ValidationFilter) Pre(c filter.Context) (statusCode int, err error) {
36 if c.(*proxyContext).validateRequest() {
37 return f.BaseFilter.Pre(c)
38 }
39
40 return fasthttp.StatusBadRequest, ErrValidationFailure
41}

Callers

nothing calls this directly

Calls 2

validateRequestMethod · 0.80
PreMethod · 0.65

Tested by

no test coverage detected