fixed cache server
This commit is contained in:
parent
78b5e5f796
commit
550bc1ee2c
2 changed files with 4 additions and 4 deletions
|
|
@ -63,7 +63,7 @@ func (cs *CacheServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
h := w.Header()
|
||||
if option == "v" {
|
||||
h.Set(csp, videoCSP)
|
||||
err = video.Execute(w, r.URL.Path)
|
||||
err = video.Execute(w, data{Paths: dirContents{Base: r.URL.Path}})
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ func (cs *CacheServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
h.Set(csp, indexCSP)
|
||||
|
||||
w.WriteHeader(i.Status())
|
||||
err = cache.Execute(w, paths)
|
||||
err = cache.Execute(w, data{Paths: paths})
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue