MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / getRouter

Method getRouter

pkg/web/web.go:340–345  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

338}
339
340func (s *Server) getRouter(path string) *mux.Router {
341 if strings.HasPrefix(path, "/api/") {
342 return s.apiRouter
343 }
344 return s.router
345}
346
347var hashRegex = regexp.MustCompile(`\.([a-f0-9]{20}|[a-f0-9]{32})(\.bundle)?\.(js|css|woff|woff2|ttf|eot|jpg|jpeg|png|svg)$`)
348

Callers 2

PrefixMethod · 0.95
PrefixWithRedirectMethod · 0.95

Calls 1

HasPrefixMethod · 0.45

Tested by

no test coverage detected