| 467 | } |
| 468 | |
| 469 | func (h *Handler) CollectionPostOrStatic(w http.ResponseWriter, r *http.Request) { |
| 470 | if strings.Contains(r.URL.Path, ".") && !isRaw(r) { |
| 471 | start := time.Now() |
| 472 | status := 200 |
| 473 | defer func() { |
| 474 | log.Info(h.app.ReqLog(r, status, time.Since(start))) |
| 475 | }() |
| 476 | |
| 477 | // Serve static file |
| 478 | h.app.App().shttp.ServeHTTP(w, r) |
| 479 | return |
| 480 | } |
| 481 | |
| 482 | h.Web(viewCollectionPost, UserLevelReader)(w, r) |
| 483 | } |
| 484 | |
| 485 | // Web handles requests made in the web application. This provides user- |
| 486 | // friendly HTML pages and actions that work in the browser. |