Give /v1/e/ ETag, 304 and HEAD as /v1/image/ has (closes #84)
check / check (push) Waiting to run
check / check (push) Waiting to run
The ETag and If-None-Match code of the /v1/image/ handler becomes notModified, which both image handlers call; /v1/e/ answers HEAD with the headers only and is routed for HEAD. HandleImageEnc was at the 80-line function limit, so its token checks move unchanged into parseImageEncRequest, as parseImageRequest does for /v1/image/. No Vary is added: only the image routes' CORS headers depend on a request header, and go-chi/cors already sends Vary: Origin with them. Model: opus-5-5
This commit is contained in:
@@ -98,6 +98,7 @@ func (s *Server) SetupRoutes() {
|
||||
// The trailing filename (e.g., /img.jpg) is ignored but helps
|
||||
// browsers with content type
|
||||
r.Get("/e/{token}/*", s.h.HandleImageEnc())
|
||||
r.Head("/e/{token}/*", s.h.HandleImageEnc())
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user