MCPcopy Index your code
hub / github.com/dnote/dnote / APIMw

Function APIMw

pkg/server/middleware/middleware.go:56–62  ·  view source on GitHub ↗

APIMw is the middleware for the API

(h http.Handler, app *app.App, rateLimit bool)

Source from the content-addressed store, hash-verified

54
55// APIMw is the middleware for the API
56func APIMw(h http.Handler, app *app.App, rateLimit bool) http.Handler {
57 ret := h
58
59 ret = ApplyLimit(ret.ServeHTTP, rateLimit)
60
61 return ret
62}
63
64// Global is the middleware for all routes
65func Global(h http.Handler) http.Handler {

Callers

nothing calls this directly

Calls 1

ApplyLimitFunction · 0.85

Tested by

no test coverage detected