feat: better caching headers for images

This commit is contained in:
2026-03-09 13:35:23 +01:00
parent a27b4a66e6
commit 2b07701762
11 changed files with 83 additions and 43 deletions
+5 -2
View File
@@ -9,12 +9,15 @@ import (
)
type Handler struct {
http.Handler
img imageService
}
func New(mux *http.ServeMux, srv imageService) *Handler {
func New(srv imageService) *Handler {
mux := http.NewServeMux()
h := &Handler{
img: srv,
Handler: mux,
img: srv,
}
mux.HandleFunc("GET /images/{uid}", h.getImage)