MCPcopy
hub / github.com/cubefs/cubefs / policyCheckMiddleware

Method policyCheckMiddleware

objectnode/api_middleware.go:188–193  ·  view source on GitHub ↗

PolicyCheckMiddleware returns a pre-handle middleware handler to process policy check.

(next http.Handler)

Source from the content-addressed store, hash-verified

186
187// PolicyCheckMiddleware returns a pre-handle middleware handler to process policy check.
188func (o *ObjectNode) policyCheckMiddleware(next http.Handler) http.Handler {
189 return http.HandlerFunc(
190 func(w http.ResponseWriter, r *http.Request) {
191 o.policyCheck(next.ServeHTTP).ServeHTTP(w, r)
192 })
193}
194
195// ContentMiddleware returns a middleware handler to process reader for content.
196// If the request contains the "X-amz-Decoded-Content-Length" header, it means that the data

Callers

nothing calls this directly

Calls 2

policyCheckMethod · 0.95
ServeHTTPMethod · 0.45

Tested by

no test coverage detected