APIMw is the middleware for the API
(h http.Handler, app *app.App, rateLimit bool)
| 54 | |
| 55 | // APIMw is the middleware for the API |
| 56 | func 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 |
| 65 | func Global(h http.Handler) http.Handler { |
nothing calls this directly
no test coverage detected