Checks whether the mux path template for the current route contains the specified pattern
(pattern string)
| 1834 | |
| 1835 | // Checks whether the mux path template for the current route contains the specified pattern |
| 1836 | func (h *handler) pathTemplateContains(pattern string) bool { |
| 1837 | route := mux.CurrentRoute(h.rq) |
| 1838 | pathTemplate, err := route.GetPathTemplate() |
| 1839 | if err != nil { |
| 1840 | return false |
| 1841 | } |
| 1842 | return strings.Contains(pathTemplate, pattern) |
| 1843 | } |
| 1844 | |
| 1845 | // getCORSConfig will return the CORS config for the handler's database if set, otherwise it will return the server CORS config |
| 1846 | func (h *handler) getCORSConfig() *auth.CORSConfig { |