MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / Middlewares

Method Middlewares

frontend/frontend.go:58–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56}
57
58func (f *Frontend) Middlewares() []pm3.IMiddleware {
59 return []pm3.IMiddleware{
60 pm3.CreateMiddle(func(method, path string) bool {
61 if method != http.MethodGet {
62 return false
63 }
64 if strings.HasPrefix(path, "/api") {
65 return false
66 }
67 return true
68 }, AddExpires, 0),
69 }
70}
71
72func (f *Frontend) Name() string {
73 return "baseFrontend"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected