Added some log

main
Uriel Fanelli 2025-05-03 15:36:41 +02:00
parent e61aad19e1
commit 13a733bf39
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ func main() {
requestedFile := filepath.Clean(r.URL.Path)
isAudio := strings.HasPrefix(requestedFile, "/audio/")
isCover := strings.HasPrefix(requestedFile, "/covers/")
// logghiamo che succede
log.Println("Richiesta da: ", r.UserAgent(), " per ", r.RequestURI)
if isAudio || isCover {
// Servi il file richiesto
http.ServeFile(w, r, filepath.Join(".", requestedFile))