mirror of https://github.com/goproxyio/goproxy
parent
a7bbe9e74f
commit
5aa10edcd3
|
@ -107,6 +107,11 @@ func (rt *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
var ctype string
|
var ctype string
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
i := strings.Index(r.URL.Path, "/@v/")
|
i := strings.Index(r.URL.Path, "/@v/")
|
||||||
|
if i < 0 {
|
||||||
|
http.Error(w, "no such path", http.StatusNotFound)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
what := r.URL.Path[i+len("/@v/"):]
|
what := r.URL.Path[i+len("/@v/"):]
|
||||||
if what == "list" {
|
if what == "list" {
|
||||||
if time.Since(info.ModTime()) >= ListExpire {
|
if time.Since(info.ModTime()) >= ListExpire {
|
||||||
|
|
Loading…
Reference in New Issue