mirror of https://github.com/goproxyio/goproxy
add access log
parent
9a38b201ef
commit
aafa0fc010
2
main.go
2
main.go
|
@ -37,7 +37,7 @@ func main() {
|
|||
|
||||
func mainHandler(inner http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(os.Stdout, "goproxy: download %s\n", r.URL.Path)
|
||||
fmt.Fprintf(os.Stdout, "goproxy: %s download %s\n", r.RemoteAddr, r.URL.Path)
|
||||
if _, err := os.Stat(filepath.Join(cacheDir, r.URL.Path)); err != nil {
|
||||
if strings.HasSuffix(r.URL.Path, ".info") || strings.HasSuffix(r.URL.Path, ".mod") {
|
||||
suffix := ".mod"
|
||||
|
|
Loading…
Reference in New Issue