small restructuring in preparation for something

This commit is contained in:
Laptop
2024-12-23 18:57:32 +02:00
parent 8adb7a8b41
commit 491aa6028c
9 changed files with 148 additions and 125 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/maid-zone/soundcloak/lib/cfg"
"github.com/maid-zone/soundcloak/lib/misc"
"github.com/maid-zone/soundcloak/lib/sc"
"github.com/valyala/fasthttp"
)
@@ -59,7 +60,7 @@ func Load(r fiber.Router) {
c.Set("Content-Type", "image/jpeg")
c.Set("Cache-Control", cfg.ImageCacheControl)
//return c.Send(resp.Body())
pr := cfg.AcquireProxyReader()
pr := misc.AcquireProxyReader()
pr.Reader = resp.BodyStream()
pr.Resp = resp
return c.SendStream(pr)