go-podcast-proxy/handle-file.go
caffeinelucy b4a978043e code
2024-08-03 20:05:08 +02:00

12 lines
257 B
Go

package main
import (
"net/http"
)
func (ctx *ServerContext) HandleFile(w http.ResponseWriter, req *http.Request) error {
ctx.WG.Add(1)
defer ctx.WG.Done()
http.ServeFile(w, req, ctx.Config.FileRoot + "/" + req.URL.Path);
return nil
}