feat: better caching headers for images
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user