Set content type on response for static file serve
This commit is contained in:
@@ -3,6 +3,7 @@ package view
|
||||
import (
|
||||
"local/dndex/config"
|
||||
"local/dndex/storage"
|
||||
"local/simpleserve/simpleserve"
|
||||
"net/http"
|
||||
"path"
|
||||
"strings"
|
||||
@@ -14,6 +15,7 @@ func files(_ storage.Graph, w http.ResponseWriter, r *http.Request) error {
|
||||
http.NotFound(w, r)
|
||||
return nil
|
||||
}
|
||||
simpleserve.SetContentTypeIfMedia(w, r)
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
return filesGet(w, r)
|
||||
|
||||
Reference in New Issue
Block a user