parent
cab949f8a6
commit
341520def3
|
@ -61,9 +61,13 @@ func (h *App) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
requestPath := r.URL.Path
|
requestPath := r.URL.Path
|
||||||
var head string
|
var head string
|
||||||
head, r.URL.Path = shiftPath(r.URL.Path)
|
head, r.URL.Path = shiftPath(r.URL.Path)
|
||||||
if head == "static" {
|
switch head {
|
||||||
|
case "static":
|
||||||
h.fileHandler.ServeHTTP(w, r)
|
h.fileHandler.ServeHTTP(w, r)
|
||||||
} else {
|
case "favicon.ico":
|
||||||
|
r.URL.Path = requestPath
|
||||||
|
h.fileHandler.ServeHTTP(w, r)
|
||||||
|
default:
|
||||||
conn, err := h.db.Acquire(r.Context())
|
conn, err := h.db.Acquire(r.Context())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 309 KiB |
Loading…
Reference in New Issue