| 193 | } |
| 194 | |
| 195 | func (h *HTTPServer) shouldServePublicPathForApp(a *App, req *http.Request) bool { |
| 196 | reqPath := path.Clean(req.URL.Path) |
| 197 | |
| 198 | if !a.Public { |
| 199 | return false |
| 200 | } |
| 201 | |
| 202 | if reqPath == "/" { |
| 203 | return false |
| 204 | } |
| 205 | |
| 206 | for _, ignoredPath := range h.IgnoredStaticPaths { |
| 207 | if strings.HasPrefix(reqPath, ignoredPath) { |
| 208 | if h.Debug { |
| 209 | fmt.Fprintf(os.Stdout, "Not serving '%s' as it matches a path in no-serve-public-paths\n", reqPath) |
| 210 | } |
| 211 | return false |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | return true |
| 216 | } |
| 217 | |
| 218 | func (h *HTTPServer) status(w http.ResponseWriter, req *http.Request) { |
| 219 | type appStatus struct { |